Please help with my code error

Reply

Join Date: Jul 2008
Posts: 39
Reputation: emiola is an unknown quantity at this point 
Solved Threads: 1
emiola emiola is offline Offline
Light Poster

Please help with my code error

 
0
  #1
Feb 24th, 2009
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
  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.
O God! He that teaches man what he knows not, please grant us the solution.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Please help with my code error

 
0
  #2
Feb 24th, 2009
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
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.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC