String error thing?
Posted: Wed Dec 15, 2010 7:50 pm
Code: Select all
<?php
$input = $_POST['msg'];
$name = $_POST['name'];
$input = strip_tags($input);
$name = strip_tags($name);
if($name == "")
{
$name = "Anonymous";
}
if (strlen($input) > 250 || strlen($name) >30)
{
header( 'Location: xxx' ) ;
}
else
{
$date = date('c');
$fileHandle = fopen('chatlog.txt', 'a')
fwrite ($fileHandle, '<br>@$date $name said:</b> $input<hr>');
fclose($fileHandle);
}
?>Get this error on submitting:
Parse error: syntax error, unexpected T_STRING in /home/sterli41/public_html/eStables/Chat/post.php on line 22