server error
Posted: Tue Dec 02, 2003 12:11 am
Server Error
The server encountered an error attempting to retrieve the requested resource. Please notify the owner of the problem.
Error notes: Premature end of script headers: /guestbook/insert.php
Why does this happen?
this is insert.php
this is for read.php
post.htm
The server encountered an error attempting to retrieve the requested resource. Please notify the owner of the problem.
Error notes: Premature end of script headers: /guestbook/insert.php
Why does this happen?
this is insert.php
Code: Select all
<?
$filewrite = "messages.txt";
$stanb = "read.php";
$linea1 = "<font face='Verdana' size='2'>Name: $nome</font>\n";
$linea2 = "<br><font face='Verdana' size='2'>E-mail: $email</font>\n";
$linea3 = "<br><font face='Verdana' size='2'>Comments:\n$messaggio</font>\n";
$linea3 = ereg_replace("\n","<br>",$linea3);
$linea3 = ereg_replace(":\(", "<img src="images/triste.gif">",$linea3);
$linea3 = ereg_replace(":)", "<img src="images/smile.gif">",$linea3);
$linea3 = ereg_replace(":D", "<img src="images/sorrisone.gif">",$linea3);
$linea3 = ereg_replace(";o", "<img src="images/redface.gif">",$linea3);
$linea3 = ereg_replace(":P", "<img src="images/tongue.gif">",$linea3);
$linea3 = ereg_replace(";)", "<img src="images/wink.gif">",$linea3);
$linea3 = ereg_replace(":o)", "<img src="images/clown.gif">",$linea3);
$linea3 = ereg_replace("8)", "<img src="images/shy.gif">",$linea3);
$linea3 = ereg_replace(":x", "<img src="images/kisses.gif">",$linea3);
$linea3 = ereg_replace(";=\(", "<img src="images/evil.gif">",$linea3);
$linea3 = ereg_replace(":I", "<img src="images/blush.gif">",$linea3);
$linea3 = ereg_replace("\?", "<img src="images/question.gif">",$linea3);
$linea3 = ereg_replace("0]", "<img src="images/alien.gif">",$linea3);
$linea3 = ereg_replace(":O", "<img src="images/shock.gif">",$linea3);
$linea3 = ereg_replace(":lol", "<img src="images/laugh.gif">",$linea3);
$linea3 = ereg_replace(":smokin", "<img src="images/smokin.gif">",$linea3);
$linea3 = ereg_replace(":rollin", "<img src="images/roll.gif">",$linea3);
$linea3 = ereg_replace(":hat", "<img src="images/pimp.gif">",$linea3);
$linea4 = date ("d/m/Y H:i")."\t";
$linea5 = " Ip: " .gethostbyaddr($REMOTE_ADDR)." ($REMOTE_ADDR)";
$linea6 = "<br><center><img src='redline.jpg' width=100% height=1 border=0></center>\n";
$file = fopen ("$filewrite", "a+");
$stringa = "$linea1 $linea2 $linea3 $linea4 $linea5 $linea6";
fputs ($file, $stringa);
fclose ($file);
include ("read.php");
?>Code: Select all
<?
$filewrite = "messages.txt";
include("$filewrite");
?>Code: Select all
<html>
<head>
<title>GB</title>
</head>
<body>
<div align="center">
<center>
<table border="0" width="894" height="370">
<tr>
<td width="373" height="370" valign="top" rowspan="19"><form method="POST" action="insert.php">
<font face="Verdana" size="2">Name: </font>
<br>
<font face="Verdana" size="2"> <input type="text" NAME="nome" size="27"></font>
<font face="Verdana" size="2"><br>E-mail: </font>
<br>
<font face="Verdana" size="2"> <input type="text" NAME="email" size="27"></font>
<font face="Verdana" size="2"><br>
Comments:</font>
<br><font face="Verdana" size="2"><textarea rows="8" NAME="messaggio" cols="27"></textarea></font>
<p><input type="submit" value="Send" NAME="stanb"><input type="reset" value="Reset" name="B2"></p>
</form>
</td>
</center>
<td width="505" height="22" valign="top" colspan="2">
<p align="left"><font face="Verdana" size="2">Emoticon:</font></td>
</tr>
<tr>
<td width="107" height="1" valign="top"><font face="Verdana" size="2">:)</font>
</td>
<td width="392" height="1" valign="top"><img border="0" src="images/smile.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="5" valign="top"><font face="Verdana" size="2">:(</font>
</td>
<td width="392" height="5" valign="top"><img border="0" src="images/triste.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="12" valign="top"><font face="Verdana" size="2">:D</font>
</td>
<td width="392" height="12" valign="top"><img border="0" src="images/sorrisone.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="17" valign="top"><font face="Verdana" size="2">:P</font>
</td>
<td width="392" height="17" valign="top"><img border="0" src="images/tongue.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="21" valign="top"><font face="Verdana" size="2">;)</font>
</td>
<td width="392" height="21" valign="top"><img border="0" src="images/wink.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="17" valign="top"><font face="Verdana" size="2">;o</font>
</td>
<td width="392" height="17" valign="top"><img border="0" src="images/redface.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="22" valign="top"><font face="Verdana" size="2">:o)</font>
</td>
<td width="392" height="22" valign="top"><img border="0" src="images/clown.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="19" valign="top"><font face="Verdana" size="2">8)</font>
</td>
<td width="392" height="19" valign="top"><img border="0" src="images/shy.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="16" valign="top"><font face="Verdana" size="2">:x</font>
</td>
<td width="392" height="16" valign="top"><img border="0" src="images/kisses.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="19" valign="top">
<font face="Verdana" size="2">;=(</font>
</td>
<td width="392" height="19" valign="top">
<img border="0" src="images/evil.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="19" valign="top">
<font face="Verdana" size="2">:I</font>
</td>
<td width="392" height="19" valign="top">
<img border="0" src="images/blush.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="9" valign="top">
<font size="2" face="Verdana">:O</font>
</td>
<td width="392" height="9" valign="top">
<img border="0" src="images/shock.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="13" valign="top">
<font size="2" face="Verdana">?</font>
</td>
<td width="392" height="13" valign="top">
<img border="0" src="images/question.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="16" valign="top">
<font size="2" face="Verdana">0]</font>
</td>
<td width="392" height="16" valign="top">
<img border="0" src="images/alien.gif" width="15" height="15">
</td>
</tr>
<tr>
<td width="107" height="18" valign="top">
<font size="2" face="Verdana">:lol</font>
</td>
<td width="392" height="18" valign="top">
<font size="2" face="Verdana"><img border="0" src="images/laugh.gif" width="15" height="15"></font>
</td>
</tr>
<tr>
<td width="107" height="20" valign="top">
<font size="2" face="Verdana">:smokin</font>
</td>
<td width="392" height="20" valign="top">
<font size="2" face="Verdana"><img border="0" src="images/smokin.gif" width="21" height="15"></font>
</td>
</tr>
<tr>
<td width="107" height="8" valign="top">
<font size="2" face="Verdana">:rollin</font>
</td>
<td width="392" height="8" valign="top">
<img border="0" src="images/roll.gif" width="50" height="15">
</td>
</tr>
<tr>
<td width="107" height="16" valign="top">
:<font face="Verdana" size="2">hat</font>
</td>
<td width="392" height="16" valign="top">
<img border="0" src="images/pimp.gif" width="22" height="23">
</td>
</tr>
</table>
</div>
</body>
</html>