ok heres my code =
<?php
//Capture data from $_POST array
$name = $_POST['myName'];;
$tosave = $_POST['myChat'];;
$closeit = ("0")
$file = file_get_contents ("chat.txt")
$working = file_get_contents ("online.txt")
if($tosave = "/close")
{
$fpclose = fopen("online.txt", "w");
if(fwrite($fpclose, $closeit)) ;
fclose($fpclose);
}
if($working = "0")
{
$save = ("thechat=Chat CLOSED
");
}else{
$save = ("$file<br>
<b>$name</b>:<i>$tosave</i><br>
");
}
$fp = fopen("chat.txt", "w");
if(fwrite($fp, $save)) ;
fclose($fp);
?>
I get a
Parse error: parse error, unexpected T_VARIABLE in /usr/home/mickyg/domains/mickyg.co.uk/public_html/chat.php on line 7
I have narrowed it down to that its something to do with the Variable $file = file_get_contents ("chat.txt")... so basiclly whats wrong with it? 😕
Thanks,
MickyG