Search the Community
Showing results for tags 'guestbook'.
-
My mission is to create a database-less guestbook I have an infernal error loop could someone help me spot the blunder the html runs but when you submit.. it goes crazy <TABLE cellSpacing=3 cellPadding=2 width="65%" border=9 align=center> <tr> <td><center><u>Guestbook</u></center></td> </tr> <tr> <td> <TABLE cellSpacing=1 cellPadding=0 border=0 align=center style="WIDTH: 95%; HEIGHT: 54px"> <tr> <td><form action="guestbook.php" method=post>Name: <input type=text width="90%" name="name"><br><textarea cols=60 rows=10 name="message"></textarea><br><Br><input type=submit value="Post"></form></td> </tr> </table> <TABLE cellSpacing=3 cellPadding=2 width="65%" border=9 align=center> <?php include("guestbook.html");?> </TABLE> </td> </tr> </TABLE> </html> <?php if(isset($_POST['name']) && isset($_POST['message'])) { if($_POST['name'] != "" && $_POST['message'] != "") { $F_D = getdate(); $FT = $F_D['mon']."/".$F_D['mday']."/".$F_D['year']; $FP = Fopen('guestbook.html',"a"); fwrite($FP,"<tr><td>Date: "); fwrite($FP, $FT); fwrite($FP, "</tD></tr><tr><td>Name: "); fwrite($FP, $_POST['name']); fwrite($FP, "</td></tr><tr><td>"); fwrite($FP, strip_tags($_POST['message'])); fwrite($FP,"</td></tr><tr><td></td></tr>"); fclose($FP); } } ?> <TABLE cellSpacing=3 cellPadding=2 width="65%" border=9 align=center> <tr> <td><center><u>Guestbook</u></center></td> </tr> <tr> <td> <TABLE cellSpacing=1 cellPadding=0 border=0 align=center style="WIDTH: 95%; HEIGHT: 54px"> <tr> <td><form action="guestbook.php" method=post>Name: <input type=text width="90%" name="name"><br><textarea cols=60 rows=10 name="message"></textarea><br><Br><input type=submit value="Post"></form></td> </tr> </table> <TABLE cellSpacing=3 cellPadding=2 width="65%" border=9 align=center> <?php include("guestbook.html"); ?> </TABLE> </td> </tr> </TABLE>