guestbook

By log2 on Dec 20, 2004

an easy little guestbook that can be viewed and edited! All you need to do is make a file called comment.txt... This part only writes into the guestbook, it does not, i repeat does not display it in anyway! and you also have to set the CHMOD to 777

<form action="<? $PHP_SELF ?>" method="post"> 
<br><input type="text" name="name" value="Name"><br> 
<textarea type="text" name="comm"> 
Add Your Comment 
</textarea><br> 
<input type="submit" value="Add"> 
<? 

$date = date("d.m.Y"); 
if (!isset ($comm) && ($name)){ 
    $fp = fopen("comment.txt","a+"); 
    fwrite($fp,nl2br("<meta http-equiv=Content-Language content=hr><table border=1 width=276 height=16><td width=128 height=4>Name:$name</td><td width=132 height=4>Date:$date</td><tr><td width=266 height=9 colspan=2>$comm</td></tr></table><br>")); 
    fclose($fp); 
} 
?> 
Messages: 
<? 
readfile ("comment.txt"); 
?> 

Comments

Sign in to comment.
natar   -  Dec 22, 2010

Oh i see..

 Respond  
ssdpa   -  Dec 22, 2010

It shows on the page but nothing added in guest book or comment.txt,
What to do now?

 Respond  
natar   -  Dec 21, 2010

It's not worked. I was tried :(

 Respond  
Hawkee   -  Mar 19, 2006

From your shell account type \"chmod 777 command.txt\"

 Respond  
alanportfolio   -  Mar 17, 2006

how do you set a CHMOD to 777???

 Respond  
efactzor   -  Sep 11, 2005

it works :) thanks

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.