Livre d'or avancé

Votre nom :

Votre adresse e-mail :
Votre adresse IP est : $ip

"; $fp1 = fopen($file1, "r"); $oldip = fgets($fp1); fclose($fp1); echo "

Montrer les commentaires

"; if (isset($_POST['comment']) && $_POST['name'] != "" && $_POST['email'] != "" && $ip != $oldip) { $comment = $_POST['comment']; $name = $_POST['name']; $email = $_POST['email']; $fp2 = fopen($file2, "r+"); $old = fread($fp2, filesize($file2)); $email = "$email"; $dateOfEntry = date("Y-n-j"); $comment = htmlspecialchars($comment); $comment = stripslashes(nl2br($comment)); $entry="

$name ($email) a écrit, le $dateOfEntry:
$comment

\n"; rewind($fp2); fputs($fp2, "$entry \n $old"); fclose($fp2); $fp1 = fopen($file1, "w+"); fputs($fp1, $ip); fclose($fp1); } readfile($file2); ?>