Norman Posted September 12, 2007 Share Posted September 12, 2007 Hi. I need a guestbook script for my next site. I would like to develope it personally, but I don't know where to start. Do you know some nice guestbook free scripts?Edit: Oh, I've found this: http://www.php-mysql-tutorial.com/mysql-php-guestbook.php Link to comment Share on other sites More sharing options...
Xtazy Posted September 12, 2007 Share Posted September 12, 2007 i used this one...so, you create a new PHP file named addbook.php , which code is this: <?php(isset($_POST['message']))?$message=$_POST['message']:$message='';(isset($_POST['name']))?$name=$_POST['name']:$name="";if ($message != ''){ $message = str_replace ("\n","<br>",$message); $message = strip_tags ($message, '<br>'); $newRow = '<div class="viewGuestbook">' . ($message) . '<br>' . date('d.m.Y H:i') . ' - ' . strip_tags ($name) . '</div>'; $oldRows = join ('', file ('guestbook.txt') ); $fileName = fopen ('guestbook.txt', 'w'); fputs ($fileName, $newRow . chr(13) . chr(10) . $oldRows); fclose ($fileName);}include ("readbook.php");?> next one: readbook.php : <div class="guestbookTop"><a href="postform.php">Write</a> to a guestbook<br><br></div><?php$fileName = file ("guestbook.txt");$rows = count ($fileName); if ($rows > 10){ if (!isset ($row) ) { $row = 0; } print ("<table class=\"guestbookLinks\"><tr><td width=\"50%\">"); if ($row > 0) { echo "<div class=\"nextPage\"><< <a href=\"readbook.php?row=" . ($row - 10) . "\">Next 10</a></div>"; } print ("</td><td width=\"50%\">"); if ( ($rows - $row) > 10) { echo "<div class=\"previousPage\"><a href=\"readbook.php?row=" . ($row + 10) . "\">Previous 10</a> >></div>"; } print ("</td></tr></table>"); for ($i = $row; $i < ($row + 10); $i++) { echo $fileName [$i]; }}else{ for ($i=0; $i < $rows; $i++) { echo $fileName [$i]; }} ?><div class="guestbookUp"><br><br><br><br> <a href="postform.php">Write</a> to a guestbook</div> and postform.php : <div class="normalText"><form action="addbook.php" method="post">Message<br><br><textarea name="message" cols="50" rows="7" class="textbox"></textarea><br><br>Name<br><br><input type="text" name="name" size="48" class="textbox"><br><br><input type="submit" value=" Submit " class="textbox"></form></div> And also create a .txt file named guestbook.txt , where the messages from your guestbook will be saved...It's not smth sophosticated, but it's good enough Link to comment Share on other sites More sharing options...
Norman Posted September 12, 2007 Author Share Posted September 12, 2007 Thank you, Xtazy. Another great web site for guestbooks: http://www.flash-guestbook.com/. They are really pretty. Link to comment Share on other sites More sharing options...
aspnetguy Posted September 12, 2007 Share Posted September 12, 2007 they look nice but take a long time to load. Link to comment Share on other sites More sharing options...
Norman Posted September 13, 2007 Author Share Posted September 13, 2007 Yes. Mhh, I think I will download a simple script.. and I will take the tame to edit the HTML code in order to have something more pretty and unique. Link to comment Share on other sites More sharing options...
Norman Posted September 13, 2007 Author Share Posted September 13, 2007 This is the best Guesbook I've found: http://www.keil-software.de/demos/sk/index.php. It cost, but it's really great, in my opinion. Link to comment Share on other sites More sharing options...
noan Posted September 14, 2007 Share Posted September 14, 2007 what language do you want to code it in? Link to comment Share on other sites More sharing options...
Norman Posted September 14, 2007 Author Share Posted September 14, 2007 I will host my website on a server with MySQL. So, probably, I will chose PHP&MySQL. Link to comment Share on other sites More sharing options...
Err Posted September 23, 2007 Share Posted September 23, 2007 I just found this one today: http://hypersilence.net/silentum_guestbook.phpIt looks to be a nice script. There's also various other things of interest. Link to comment Share on other sites More sharing options...
Daniz Posted April 29, 2008 Share Posted April 29, 2008 What about a CSS guest book? Id like one on CSS. If u find one tell me Link to comment Share on other sites More sharing options...
Synook Posted April 30, 2008 Share Posted April 30, 2008 You can't create a guestbook with just CSS, as CSS can't perform actions, respond to events (more than through pseudo-classes), or save and retreive text data. You will need to use a server-side language to save the comments. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.