Page 1 of 1

Some fopen troubles..

Posted: Sun May 25, 2003 2:42 pm
by Drachlen
Okay... Heres my error:
Parse error: parse error, unexpected T_VARIABLE on line 6

Heres my code:

Code: Select all

<?php
$title = $_GET['$title'] . "\n"; 

$comment = $_GET['$comment'] . "\n";

$str = $title . "\n" $comment . "\n";

$fp = fopen("./loggin.txt", "a+"); 


fputs($fp, $str); 


fclose($fp); 
?>
I was just messing around trying to figure out a way to make a simple guest book or forum type thing without going all complex into mysql and such. Im not sure what a T_VARIABLE is, so i dont know what to fix..

Posted: Sun May 25, 2003 2:55 pm
by volka
$str = $title . "\n" $comment . "\n";
missing a dot between "\n" and $comment.