comment.php error problem

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]

Looks like your escape function never closes.

What didn’t I do?

You didn’t close the function. You have an opening bracket, but no matching closing bracket for it.

What line is the opening bracket on?

Wow

Where you declare the function…

That creates an infinite loop from the looks of it.

On what line is it?

I suggest you read thru YOUR code then to figure out what it is doing. I have other things to do as well.

…but replied, anyway. Sound real busy :wink:

What line is the opening bracket on?

OMG! :o LOL!

Sponsor our Newsletter | Privacy Policy | Terms of Service