Current location: Hot Scripts Forums » Programming Languages » PHP » Parse Error - checked and double checked


Parse Error - checked and double checked

Reply
  #1 (permalink)  
Old 01-18-10, 07:35 PM
redkirkland redkirkland is offline
New Member
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Parse Error - checked and double checked

The below code returns "Parse error: syntax error, unexpected T_VARIABLE in /home/XXXXXX/public_html/bp/signup.php on line 3" - I used the code exactly as stated from another forum on here but it's not processing. Any help/suggestions?

PHP Code:

<?php


$firstname 
$_POST['firstname'];
$lasttname $_POST['lastname'];
$address $_POST['address'];
$city $_POST['city'];
$state $_POST['state'];
$zip $_POST['zip'];
$phone $_POST['phone'];
$email $_POST['email'];
$registration $_POST['registration'];
$d date("Ymd");

//the data 
$data "$firstname | $lastname | $address | $city | $state | $zip | $phone".
" | $email | $registration | $d\n"

//open the file and choose the mode 
$fh fopen("users.txt""a"); 
fwrite($fh$data); 

//close the file 
fclose($fh); 

print 
"User Submitted"

?>
Reply With Quote
  #2 (permalink)  
Old 01-18-10, 07:58 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
You have two ts in last name ...

What version of PHP are you using?

You should validate and sanitize the data if this will be publicly accessible.
Reply With Quote
  #3 (permalink)  
Old 01-18-10, 08:02 PM
redkirkland redkirkland is offline
New Member
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Fixed the tt

Fixed the double tt, but the issue is that it's still not working. Still not pulling the data and still giving me the error. Any reason why the POST would return the error?
Reply With Quote
  #4 (permalink)  
Old 01-18-10, 08:04 PM
redkirkland redkirkland is offline
New Member
 
Join Date: Jan 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Version - 4.4.9 --Sorry
Reply With Quote
  #5 (permalink)  
Old 01-18-10, 08:09 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
No syntax errors detected in test.php
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Objects Between Classes. mik489 C/C++ 0 04-22-09 02:15 PM
Vb Help zobi316 Visual Basic 3 02-28-08 05:03 PM
Summing cells from different worksheets within a formula in vba sintegro65 Visual Basic 5 10-18-06 11:40 PM
problem returning interest in bankaccount program psi3000 Everything Java 6 03-27-06 01:14 PM
Writeline - double quotes Davidw Windows .NET Programming 0 06-16-04 12:20 PM


All times are GMT -5. The time now is 08:06 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.