Some fopen troubles..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Drachlen
Forum Contributor
Posts: 153
Joined: Fri Apr 25, 2003 1:16 am

Some fopen troubles..

Post 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..
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

$str = $title . "\n" $comment . "\n";
missing a dot between "\n" and $comment.
Post Reply