homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Powerful free PHP guestbook

 2:41 pm on Aug 26, 2002 (gmt 0)

Can anybody recommend a powerful (with many features) and free PHP guestbook. Possibly without mySQL, as I'm a newbie and have no idea how install a mySQL thing.

I need a very customisable guestbook whose entries contain the following fields:
- name
- email
- homepage url
- homepage name
- date message posted
- referrer (found site through...)

If there is no way of doing it without mySQL, I'd need detailed instructions on how to set up the thing.

[edited by: jatar_k at 4:47 pm (utc) on Aug. 26, 2002]
[edit reason] snip url [/edit]



 2:46 pm on Aug 26, 2002 (gmt 0)
Welcome to WebmasterWorld Scooter24!
[1]If you havent already been :[smilestopper])[/1]

I dont know of a specific one but here is a list of 217 I am sure one of them is not going to use a MySQL.



 4:51 pm on Aug 26, 2002 (gmt 0)


You have described what you are looking for very well and don't need the url to show us. Take a look at Knowles' suggestion there are a lot of useful scripts in that list.


 6:41 pm on Aug 26, 2002 (gmt 0)

I don't know how well I described things and if people really understood what I meant. That's why I posted the example URL.

So are all URLs in posts forbidden ?


 6:51 pm on Aug 26, 2002 (gmt 0)

knowles and I understood, I thought you described it quite well.

check your stickymail


 10:33 am on Aug 27, 2002 (gmt 0)

I tried yesterday eight different guestbooks from that resource. Not sure if I found what I was looking for (spent a few hours playing with them and don't know yet if I can customise them the way I want).

What I was hoping to get, was a pointer to a specific (free) guestbook which exactly matches my criteria and with whom somebody had positive experiences.

If it's forbidden to post URLs, then just tell me the name of such a free PHP guestbook and I'll look for it with Google.


 11:07 am on Aug 27, 2002 (gmt 0)

... or send me a sticky mail with the guestbook name or URL.


 12:35 am on Sep 1, 2002 (gmt 0)

Try this one on for size. NO data base needed! Creates the data file on the first submit by itself.

<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<body bgcolor="#FFFFFF">
<form method="post" action="">
<input type="text" name="name" size="30">
<input type="text" name="email" size="30">
<textarea name="message" wrap="VIRTUAL" cols="30" rows="4"></textarea>
Homepage URL:
<input type="text" name="homepageurl" size="30" value="http://">
Homepage Name:
<input type="text" name="homepagename" size="30">
<input type="hidden" name="from" value="<? echo $HTTP_REFERER ?>">
<input type="submit" name="Submit" value="Submit">

<!-- start php code -->

if ($message)
$name = strip_tags($name);
$email = strip_tags($email);
$homepageurl = strip_tags($homepageurl);
$homepagename = strip_tags($homepagename);
$message = strip_tags($message);
$message = ereg_replace("\r\n\r\n", "\n<P>", $message);

if (get_magic_quotes_gpc())
$message = stripslashes($message);
$name = stripslashes($name);

$date = date("l, F j Y");
$message = "<B>$name </B> -- $date -- <a href=mailto:$email>$email</a><br>$message<br><a href=$homepageurl>$homepagename</a><br>Refered by $from<br><br>\r\n";

$textfile = "guestbook.txt";
if ($fp = @fopen ($textfile, "r"))
$oldmessages = @fread($fp,filesize($textfile));

$fp = fopen ($textfile, "w");
fwrite ($fp, $message);
fwrite ($fp, $oldmessages);
fclose ($fp);

<!-- end php code -->


Copy the above and name it what ever you want with a .php extension
You can work on the layout :-)

[edited by: jatar_k at 7:42 pm (utc) on Sep. 1, 2002]
[edit reason] fixed code tag [/edit]


 1:19 pm on Sep 2, 2002 (gmt 0)

Thank you.

I'll try out the script.


 2:45 pm on Sep 2, 2002 (gmt 0)

I'm getting errors when using this:

Warning: fopen("guestbook.txt", "w") - Permission denied in /usr/www/users/mysite/guestbook.php on line 63

Warning: Supplied argument is not a valid File-Handle resource in /usr/www/users/mysite/guestbook.php on line 64

Warning: Supplied argument is not a valid File-Handle resource in /usr/www/users/mysite/guestbook.php on line 65

Warning: Supplied argument is not a valid File-Handle resource in /usr/www/users/mysite/guestbook.php on line 66


 2:47 pm on Sep 2, 2002 (gmt 0)

You need to change the CHMOD the guestbook.txt file, I think 667 should do I cant remember of the top of my head. You can do this in your FTP client or possibly through your Control panel for your hosting.


 2:57 pm on Sep 2, 2002 (gmt 0)

You might need to set the directory that it is located in to read and write.

Also try naming the file with .php3


 11:16 am on Sep 3, 2002 (gmt 0)

The script worked for me after I created an empty guestbook.txt file with notepad, uploaded it and set its permissions to 777. I also set the permissions of the directory where it resides to 755.

Naming the script with .php was sufficient.

But there is one thing missing - the referrer input field ('found site through' with a pull-down menu).


 9:50 pm on Sep 3, 2002 (gmt 0)

The script was set to automaticaly detect the referrer.

Just change
<input type="hidden" name="from" value="<? echo $HTTP_REFERER ?>">
<select name="from" class="inputbox">
<option value="" selected>- Please Select -
<option value="foo">foo
<option value="foo2">foo2
<option value="foo3">foo3
<option value="foo4">foo4
<option value="foo5">foo5

foo = what ever you want the choices to be.



 6:47 am on Oct 20, 2002 (gmt 0)

I used this code, and the only error message i recieved was:

Notice: Undefined variable: message in c:\inetpub\wwwroot\dc\pu\guestbook\index.php on line 38

any help?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved