Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Php Form Help!, Parse error T_LNUMBER - expecting T_VARIABLE
JewelzyGrl
post Jun 4 2006, 04:00 AM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 4-June 06
Member No.: 24,705



Hello, I am trying to make an employee application. I was just wondering if anyone knows how to spot a php code error, when the code directly around the line with the error looks the same. below is some of my process.php code. I beleive the error is on line 41.

QUOTE
PHP parse error: [03-Jun-2006 02:08:41] PHP Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/wwwange/public_html/FORMS/forms/process.php on line 41


Process.php code:
CODE
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','FirstName');
pt_register('POST','LastName');
pt_register('POST','Address');
pt_register('POST','CityStateZip');
pt_register('POST','Phone');
pt_register('POST','Email');
pt_register('POST','Typeofemploymentdesired');
pt_register('POST','Dateavailableforwork');
pt_register('POST','Haveyoubeenconvictedofafelonywithinthelast7years');
pt_register('POST','Haveyoubeenconvictedofamovingviolationwithinthepast5years');
pt_register('POST','AreyoulegallyeligibleforemploymentintheUnitedStates');
pt_register('POST','Haveyoueverbeendismissedorfiredfromanyjob');
pt_register('POST','DoyouhaveavalidDriversLicense');
pt_register('POST','DriversLicensenumber');
pt_register('POST','CurrentJobCompanyName');
pt_register('POST','CurrentAddress');
pt_register('POST','CurentCityStateZip');
pt_register('POST','CurrentPhone');
pt_register('POST','PresviousEmploymentCoName');
pt_register('POST','PreviousAddress');
pt_register('POST','PrseviousCityStateZip');
pt_register('POST','PrseviousPhone');
pt_register('POST','2ndpreviousCoName');
pt_register('POST','2ndAddress');
pt_register('POST','2ndCityStateZip');
pt_register('POST','2ndPhone');
pt_register('POST','Areyouacertifiedcaregiver');
$CaregiverCertification=$HTTP_POST_FILES['CaregiverCertification'];
$CPRFIRSTAID=$HTTP_POST_FILES['CPRFIRSTAID'];
$FingerprintCard=$HTTP_POST_FILES['FingerprintCard'];
pt_register('POST','OtherCertifications');
$OtherCertifications=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $OtherCertifications);$CurrentResume=$HTTP_POST_FILES['CurrentResume'];
$UploadCertifications=$HTTP_POST_FILES['UploadCertifications'];
pt_register('POST','HighSchoolAttendedNameAddressPhone');
$HighSchoolAttendedNameAddressPhone=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $HighSchoolAttendedNameAddressPhone);pt_register('POST','Referencenameaddressphone');
$Referencenameaddressphone=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Referencenameaddressphone);pt_register('POST','2ndReferencenameaddressphone');
$2ndReferencenameaddressphone=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $2ndReferencenameaddressphone);pt_register('POST','Besttimetocall');
pt_register('POST','Signature');
if($FirstName=="" || $LastName=="" || $Address=="" || $CityStateZip=="" || $Phone=="" || $Email=="" || $Typeofemploymentdesired=="" || $Dateavailableforwork=="" ||


Notice from BuffaloHELP:
Use QUOTE for all copied messages and CODE for all other codes.
Go to the top of the page
 
+Quote Post
Spectre
post Jun 4 2006, 04:27 AM
Post #2


Privileged Member
*********

Group: Members
Posts: 874
Joined: 30-July 04
Member No.: 246



The problem is the variable '$2ndReferencenameaddressphone' which first appears on line 41 - although they can contain them, variables cannot begin with a number, and this one evidently does. A simple fix would be to replace all instances of '$2ndReferencenameaddressphone' with '$secondReferencenameaddressphone' or something similar (just make sure it's unique).
Go to the top of the page
 
+Quote Post
JewelzyGrl
post Jun 4 2006, 04:31 AM
Post #3


Newbie
*

Group: Members
Posts: 3
Joined: 4-June 06
Member No.: 24,705



Thank you for your help. I will try that. I will let you know what happens. Thanks
Go to the top of the page
 
+Quote Post
JewelzyGrl
post Jun 4 2006, 05:08 AM
Post #4


Newbie
*

Group: Members
Posts: 3
Joined: 4-June 06
Member No.: 24,705



Thank you so much! It worked! Your the best.
Check out the form here.

http://www.angelsonduty.net/FORMS/forms/form1.html
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Trouble With Emailer.php(5)
  2. Determining Whether A Phrase Is In A Variable(2)
  3. Error When Using file_put_contents()(4)
  4. Weird Error Messages In Opera(2)
  5. Validation Error No Insert(3)
  6. Phpbb Install Error(2)
  7. Parse Error(1)
  8. Parse: Error Unexpected T_lnumber(4)
  9. Suppressing Mysql Error In Php(4)
  10. Php Error When Running Script(3)
  11. <textarea> Tag Is Not Accepting Php Variable(2)
  12. Converting Characters In A Variable To Individual Values In An Array(2)
  13. Freetype, Gd And An Error(1)
  14. Uglymonkey Toplist Script(7)
  15. Detect Image Resolution Without Gd(1)
  1. Help Needed With Silly Error(8)
  2. Error Importing Sql Query Via Php(6)
  3. [forum] Double Posting Happening By An Error(3)
  4. Error With Joomla Template(1)
  5. Error On Emailer.php & Smtp.php At Phpbb(2)
  6. Php Fsockopen() Error(14)
  7. Phpbb2 Error(4)
  8. T_string Error Please Assist(5)
  9. Getting An Array Value Of A Dynamic Variable(9)
  10. Php Objects: Catchable Fatal Error(4)
  11. Script Help Required: Undefined Variable(3)
  12. Unexpected T_variable...(3)
  13. Mysql Error(3)


 



- Lo-Fi Version Time is now: 6th September 2008 - 01:27 AM