Code has error “unexpected end of file” on last line. Not sure. (Apology, forgot I needed to start new topic)
[php]
testcomment <?php function escape ($string) { $name = escape($name); $email = escape($email); $message = escape($message); $data = date('D, M. j, Y @ g:i a'); return htmlspecialchars($string, ENT_QUOTES, "UTF-8"); if (!$name || !$email || !$message) { echo "*Please fill out required fields"; } else { if(strlen($name) > 0 && strlen($message)> 0) { (filesize('testcomments.log') > 0); } } $outputstring = $pre. ''.$name.'. '.$email.''.$data('D, M. j, Y @ g:i a').'
'.$message.'
'; fwrite($fp, $outputstring, strlen($outputstring)); fclose($fp); Header('Location:testcomments.log'); ?>Comments:
<?php include("testcomments.log");?> [/php]