El error ke tengo kon este script es despues de subirlo y usarlo no aparecen los comentarios, el archivo *.dat donde se almacenan los datos si se krea pero no aparecen los comentarios en la pagina php
=======================================
Código PHP:
<? $ip = getenv("REMOTE_ADDR"); if($name && $msg) { $linkdeal = ereg_replace("<","<",$msg); $linkdeal = ereg_replace(">",">",$msg); include ("suggestions.inf"); $date = date ("M j, Y"); $fp = fopen($comments, r); if($fp) { $commentsArray = file($comments); $result = implode("", $commentsArray); $result = "$string$result"; fclose($fp); } $fp = fopen($comments, w); if($fp) { fputs($fp, $result); fclose($fp); } header("location: suggestions.php"); } readfile("suggestions.dat"); ?>
<form action="suggestions.php" method="post">
<input type="hidden" name="ip" value="$ip">
Name: <input type="text" name="name">
Email Address: <input type="text" name="email">
Suggestion:<br><textarea name="msg" cols="30" rows="8"></textarea>
<input type="submit" name="write" value="Suggest!">
</form>
<!-- DO NOT REMOVE THE FOLLOWING LINES! -->
<br><center><font face="verdana, arial, ms sans serif, sans serif" size="1">Suggestions Box v1.0<br><a href="http://www.square-unlimited.org/j3i/index.php" target="_top">Provided by: J3i Inc.</a></font></center>
este archivo venia adjunto tambien el el script "suggestions.inf"
==================================
Código PHP:
<? $comments = "suggestions.dat";
$string = '<b>Date:</b> $date<br><b>Visitor:</b> <a href="mailto:$email">$name</a><br><br>$msg</font><hr size="1" width="100%">\n'; ?>