User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 455,968 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,746 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 542 | Replies: 2
Reply
Join Date: Nov 2007
Posts: 2
Reputation: sallywt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sallywt sallywt is offline Offline
Newbie Poster

Help parse error

  #1  
Nov 23rd, 2007
hi - it's my first day attempting php and my second page.. the first one went ok so I copied it for the second and amended accordingly however I'm getting a parse error and can't find the problem - can anyone help?!

Parse error: parse error, unexpected T_STRING in /data/quint/html/q_wine_site/qw_join.php on line 17

Below is the first part of the code for comparison with lines before and after - the....
$Post Code = Trim(stripslashes($_POST['POSTCODE']));
.....is the mysterious line 17...

<?php

// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "sally@quintessentially.com";
$Subject = "Quintessentially Wines New Registration Form";
$Title = Trim(stripslashes($_POST['TITLE']));
$FirstName = Trim(stripslashes($_POST['F_NAME']));
$Initials = Trim(stripslashes($_POST['M_INITIALS']));
$Surname = Trim(stripslashes($_POST['L_NAME']));
$DOB = Trim(stripslashes($_POST['DOB']));
$Gender = Trim(stripslashes($_POST['MF']));
$Address1 = Trim(stripslashes($_POST['ADDRESS']));
$Address2 = Trim(stripslashes($_POST['ADDRESS1']));
$City = Trim(stripslashes($_POST['CITY']));
$County = Trim(stripslashes($_POST['COUNTY']));
$Post Code = Trim(stripslashes($_POST['POSTCODE']));
$Country = Trim(stripslashes($_POST['COUNTRY']));
$Email Address = Trim(stripslashes($_POST['EMAIL']));
$Home Tel. = Trim(stripslashes($_POST['HOME_TEL']));
$Mobile. = Trim(stripslashes($_POST['MOBILE']));
$Work Tel. = Trim(stripslashes($_POST['WORK_TEL']));
$Company = Trim(stripslashes($_POST['COMP_NAME']));
$Job Title = Trim(stripslashes($_POST['JOB_TITLE']));
$Submit Date = Trim(stripslashes($_POST['SUBSCRIBE_DATE']));
$Proposed by = Trim(stripslashes($_POST['proposer']));
$Heard about Q = Trim(stripslashes($_POST['heardAbout']));
$TCcheck = Trim(stripslashes($_POST['privacy_policy']));


// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($Surname)=="") $validationOK=false;
if (Trim($Title)=="") $validationOK=false;
if (Trim($DOB)=="") $validationOK=false;
if (Trim($Address1)=="") $validationOK=false;
if (Trim($City)=="") $validationOK=false;
if (Trim($Post Code)=="") $validationOK=false;
if (Trim($Country)=="") $validationOK=false;


any advice for a newbie much appreciated"
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 636
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 71
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: parse error

  #2  
Nov 23rd, 2007
i think you cannot have spaces in variable names. ex. $Post Code try $Post_Code
Reply With Quote  
Join Date: Nov 2007
Posts: 2
Reputation: sallywt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sallywt sallywt is offline Offline
Newbie Poster

Re: parse error

  #3  
Nov 23rd, 2007
thanks very much - will try that when back at my desk on monday! I presume if I just fixed that one line it would come up with the next and doesn't point out all the line errors at once? (i've not had a parse error before hence why I'm unfamiliar with how the errors appear!)that would make sense as it's the first time the space occurs...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC