•
•
•
•
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
![]() |
•
•
Join Date: Nov 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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"
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"
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 636
Reputation:
Rep Power: 3
Solved Threads: 71
•
•
Join Date: Nov 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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...
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Help. Parse error in PHP code (PHP)
- PHP Parse error: parse error, unexpected T_STRING (PHP)
- Parse error: parse error, unexpected T_STRING in /home/thei2k9/public_html/includes/f (PHP)
- Need Help With Parse Error... (PHP)
- Parse Error message when testing page on browser - HELP!! (PHP)
- Parse error: (PHP)
- I need help with a parse error! (PHP)
- Parse error, syntax error, Forbids declaration (C++)
Other Threads in the PHP Forum
- Previous Thread: display table border
- Next Thread: Help with php and dreamweaver requested


Linear Mode