ztros Posted May 18, 2006 Share Posted May 18, 2006 I am trying to create a contact form where they enter the info and it sends the info to a specified email address. it sends the email, but the subject and message are blank. can anyone help take a look and tell me where i went wrong? thanks.[a href=\"http://www.anteinc.com/AIcontact.php\" target=\"_blank\"]http://www.anteinc.com/AIcontact.php[/a] is the page location Quote Link to comment https://forums.phpfreaks.com/topic/9907-contact-form-help/ Share on other sites More sharing options...
.josh Posted May 18, 2006 Share Posted May 18, 2006 please show us the code. we can't see your code from the link, as it is parsed on the server. Quote Link to comment https://forums.phpfreaks.com/topic/9907-contact-form-help/#findComment-36823 Share on other sites More sharing options...
ztros Posted May 18, 2006 Author Share Posted May 18, 2006 <html><style type="text/css"><!--body { background-color: #595E5E;}body,td,th { color: #FFFFFF; font-family: BankGothic Md BT;}a:link { color: #F26522;}a:visited { color: #F26522;}a:hover { color: #946016;}a:active { color: #F26522;}.style2 {color: #F26522}.style3 { font-family: "Amazone BT"; color: #F26522; font-size: 24px;}.style4 { color: #FFFFFF; font-weight: bold;}--></style> <div> <form method="post" action="<?=$PHP_SELF; ?>"> </form> </div> <table width="748" border="3" align="center"> <tr> <th width="373" scope="col"><img src="http://71.18.36.32/images/shield copy.png" width="305" height="422"></th> <th width="355" scope="col"><p align="center"><span class="style3">A</span>t Ante Inc<span class="style2"><strong>.,</strong></span> maintaining the highest possible level of efficency is a never ending goal for ourselves and our clients alike<span class="style2"><strong>.</strong></span></p> <p align="center"><span class="style3">T</span>aking advantage of our services will enable you to spend more time fine<span class="style2"><strong>-</strong></span>tuning your business<span class="style2"><strong>,</strong></span> and less time trying to perfectly code various sections of your website<span class="style2"><strong>.</strong> </span></p> <p align="center"><span class="style3">T</span>hank you<span class="style2"><strong>,</strong></span> in advance<span class="style2"><strong>,</strong></span> for your feedback<span class="style2"><strong>!</strong></span></p></th> </tr> <tr> <th colspan="2" scope="row"><span class="style2">Please Fill out the following form and click on submit<span class="style4">.</span>expect a response in 2<span class="style4">-</span>3 days<span class="style4">.</span></span></th> </tr> <tr> <th height="247" scope="row"><p>Name<span class="style2"><strong>:</strong></span></p> <input name="name" type="text" /> <p>Email<span class="style2"><strong>:</strong></span></p> <input name="email" type="text" /> <p>Subject<span class="style2"><strong>:</strong></span></p> <input name="subject" type="text" /> <div> <form method="post" action="<?=$PHP_SELF; ?>"> <input name="submit" type="submit" class="style2" value="Send" /> <input type="hidden" name="do" value="send" /> <input name="reset" type="reset" class="style2" value="Reset" /> </form> </div> <? $do = ($_POST['do']); if($do == "send") { $recipient = "ztros@anteinc.com"; $subject = ($_POST['subject']); $name = ($_POST['name']); $email = ($_POST['email']); $message = ($_POST['message']); $formsend = mail("$recipient", "$subject", "$message", "From: $email ($name)\r\nReply-to:$email"); echo ("<p>Your message was submitted!</p>"); } ?> <p> </p> </th> <th height="247" scope="row"><p>Message<span class="style2"><strong>:</strong></span></p> <p> <textarea name="message" rows="6"></textarea> </p> <p> </p> <p> If you have problems with this form <a href="mailto:ztros@anteinc.com">click here</a> to submit feedback<span class="style2"><strong>.</strong> </span></p></th> </tr> </table> </html> Quote Link to comment https://forums.phpfreaks.com/topic/9907-contact-form-help/#findComment-36829 Share on other sites More sharing options...
ztros Posted May 20, 2006 Author Share Posted May 20, 2006 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/9907-contact-form-help/#findComment-37390 Share on other sites More sharing options...
kenrbnsn Posted May 20, 2006 Share Posted May 20, 2006 You HTML code is so full of errors that it's amazing it even works.The proper format of an HTML files is[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<html><head> <title></title> any style tags go here</head><body></body></html>[/quote]You are missing the <head></head> and the <body></body> tags.Make one form that encompasses all of your form tags. You have two or three.If you had tried to validate your HTML, you would have found these errors.Correct your HTML and your form should work.Ken Quote Link to comment https://forums.phpfreaks.com/topic/9907-contact-form-help/#findComment-37449 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.