943,977 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 334
  • PHP RSS
Feb 24th, 2009
0

Please help with my code error

Expand Post »
I keep on getting this message:

Parse error: syntax error, unexpected T_ECHO in /home/lsschnln/public_html/Registration Form/quiz_regedit_2.php on line 32
after running the script
php Syntax (Toggle Plain Text)
  1. <html>
  2. <body><?php
  3. if (isset($_POST['submit']))
  4. {
  5. $to = "quizentry@lagosschoolsonline.net" ;
  6. $subject = "Quiz Entry" ;
  7. $SchoolName = $_POST['SchoolName'] ;
  8. $SchoolAddress = $_POST['SchoolAddress'] ;
  9. $Locality = $_POST['Locality'] ;
  10. $MobileNumber = $_POST['MobileNumber'] ;
  11. $Landphone = $_POST['Landphone'] ;
  12. $email = $_POST['email'] ;
  13. $website = $_POST['website'] ;
  14. $ContactPerson = $_POST['ContactPerson'] ;
  15. $MarketerInCharge = $_POST['MarketerInCharge'] ;
  16. $Username = $_POST['Username'] ;
  17. $Password = $_POST['Password'] ;
  18. // SECTION B
  19. $malecandidate = $_POST['malecandidate'] ;
  20. $ddm = $_POST['ddm'] ;
  21. $mmm = $_POST['mmm'] ;
  22. $yym = $_POST['yym'] ;
  23. $Refnumberm = $_POST['Refnumberm'] ;
  24. //FEMALE
  25. $femalecandidate = $_POST['femalecandidate'] ;
  26. $ddf = $_POST['ddf'] ;
  27. $mmf = $_POST['mmf'] ;
  28. $yyf = $_POST['yyf'] ;
  29. $Refnumberf = $_POST['Refnumberf'] ;
  30. $message = $_POST('$SchoolName','$SchoolAddress','$Locality','$MobileNumber','$Landphone','$email','$website','$ContactPerson','$MarketerInCharge','$Username','$Password','$malecandidate','$ddm','$mmm','$yym','Refnumberm','$femalecandidate','$ddf','$mmf','$yyf','$Refnumberf') ;
  31. mail($to,$subject,$message)
  32. echo "Your entries have been submitted.Thank you." ;
  33. }
  34. else
  35. echo "Form not properly completed")?>
  36. </body>
  37. </html>
The error is becoming a horror for me. Please help.
Reputation Points: 10
Solved Threads: 1
Light Poster
emiola is offline Offline
49 posts
since Jul 2008
Feb 24th, 2009
0

Re: Please help with my code error

2 errors. 1st one is on line 30. $message = $_POST('$SchoolName',....
2nd error, there is no ; after mail function. Please check this for the correct syntax of mail function!

Edit: Also, this
Quote ...
echo "Form not properly completed")
is not terminated by a semicolon and there is an extra )
Last edited by nav33n; Feb 24th, 2009 at 12:47 pm.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Putting MySql val in drop menu and processing selection
Next Thread in PHP Forum Timeline: having problem with dirLIST





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC