Need forum's help: urgent please!

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

Need forum's help: urgent please!

 
0
  #1
Feb 23rd, 2009
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:
  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.
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: Apr 2005
Posts: 1,403
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 224
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Need forum's help: urgent please!

 
0
  #2
Feb 23rd, 2009
It might not be the error that's causing your problem but remove the semicolon after the second if statement
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
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

Re: Need forum's help: urgent please!

 
0
  #3
Feb 23rd, 2009
I have removed the semi-colon but the result is still the same. Any other suggestion please?
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: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Need forum's help: urgent please!

 
0
  #4
Feb 23rd, 2009
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.
Reply With Quote Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC