Leadwing Posted April 15, 2008 Share Posted April 15, 2008 Hi there, I have a page with an image upload and a textarea field. The image upload works fine, but I also want to create a text file which is called the $_SESSION['name'] (which is given earlier on) and contains what they put in the field. I have: $imgname = $_SESSION['name'] $file = $imgname; $fh = fopen($file, 'w') or die("can't open file"); $imgnote = $_POST['imgnote']; fwrite($fh, $imgnote); fclose($fh); I dont understand why it wont work, I can get it to be named anything else. It comes up with "Parse error: syntax error, unexpected T_VARIABLE in #####.co.uk/user/htdocs/ss/ss4.php on line 28" And i do have a working session and everything! Thanks Quote Link to comment Share on other sites More sharing options...
craygo Posted April 15, 2008 Share Posted April 15, 2008 you forgot your semicolon $imgname = $_SESSION['name']; // need semi colon Ray Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.