|
|
|
|
![]() ![]() |
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)/"," <br />", $OtherCertifications);$CurrentResume=$HTTP_POST_FILES['CurrentResume']; $UploadCertifications=$HTTP_POST_FILES['UploadCertifications']; pt_register('POST','HighSchoolAttendedNameAddressPhone'); $HighSchoolAttendedNameAddressPhone=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $HighSchoolAttendedNameAddressPhone);pt_register('POST','Referencenameaddressphone'); $Referencenameaddressphone=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Referencenameaddressphone);pt_register('POST','2ndReferencenameaddressphone'); $2ndReferencenameaddressphone=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $2ndReferencenameaddressphone);pt_register('POST','Besttimetocall'); pt_register('POST','Signature'); if($FirstName=="" || $LastName=="" || $Address=="" || $CityStateZip=="" || $Phone=="" || $Email=="" || $Typeofemploymentdesired=="" || $Dateavailableforwork=="" || |
|
|
|
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).
|
|
|
|
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
|
|
|
|
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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th September 2008 - 01:27 AM |