943,844 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 425
  • PHP RSS
Feb 23rd, 2009
0

Need forum's help: urgent please!

Expand Post »
Dear friends,
Kindly look into this code below for me. I intend to use it to send my form data(not validated) to an email address. After I filled the form and running the code, it is the else echo statement ("Form not properly completed") that i keep recieving. However, I could not locate the problem. Please treat as urgent for me.
See code below:
php Syntax (Toggle Plain Text)
  1. <html>
  2. <body><?php
  3. if (isset($_POST['submit']))
  4. {
  5. $to = "quizentry@lagosschoolsonline.net";
  6. $from = "quizentry@lagosschoolsonline.net";
  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. //email address used//
  31. if (mail($to,$SchoolName,$SchoolAddress,$Locality,$MobileNumber,$Landphone,$email,$website,$ContactPerson,$MarketerInCharge,$Username,$Password,$malecandidate,$ddm,$mmm,$yym,$Refnumberm,$femalecandidate,$ddf,$mmf,$yyf,$Refnumberf));
  32. echo "Your entries have been submitted. Thank you." ;
  33. }
  34. else
  35. echo "Form not properly completed"?>
  36. </body>
  37. </html>
Thank you.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
emiola is offline Offline
49 posts
since Jul 2008
Feb 23rd, 2009
0

Re: Need forum's help: urgent please!

It might not be the error that's causing your problem but remove the semicolon after the second if statement
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Feb 23rd, 2009
0

Re: Need forum's help: urgent please!

I have removed the semi-colon but the result is still the same. Any other suggestion please?
Reputation Points: 10
Solved Threads: 1
Light Poster
emiola is offline Offline
49 posts
since Jul 2008
Feb 23rd, 2009
0

Re: Need forum's help: urgent please!

i thought mail only has 4 basic attributes. you have a lot more than that. you need to put all the variables that need to be included in the email into one variable and pass that to the function.

look here for examples: http://us3.php.net/manual/en/function.mail.php
Last edited by kkeith29; Feb 23rd, 2009 at 4:05 pm.
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 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: Can someone help me with my login page!!!
Next Thread in PHP Forum Timeline: register and email conformation





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


Follow us on Twitter


© 2011 DaniWeb® LLC