Porkie Posted April 27, 2009 Share Posted April 27, 2009 Hey for some reason this doesnt seem to submit when i try to submit using my form before.iam pritty sure that the contact form is ok which means the error must lie in here somewhere. can someone please help me out ? and also i want to make this text white. how could i do it? echo nl2br("<h2>Your Data has been submitted to our Support Team</h2>") ; cheers in advance <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; } --> </style><title>Getrecognized.co.uk - Thank You</title> <div align="center"><img src="images/gr-edit.png" width="604" height="100"></div> <?php if(isset($_POST['submit'])) { $to = "georgeguest250@hotmail.com"; $namefield = $_POST['nbox']; $emailfield = $_POST['ebox']; $messagefield = $_POST['mbox']; $sub = $_POST['sbox']; $subject = "Get Recognized (Name: $namefield) (Email: $emailfield) (Subject: $sub)"; $body = "\n From: $namefield\n E-Mail: $emailfield\n \n Subject: $sub\n Message: $messagefield\n"; echo nl2br("<h2>Your Data has been submitted to our Support Team</h2>") ; mail($to, $subject, $body); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/155900-simple-problems/ Share on other sites More sharing options...
premiso Posted April 27, 2009 Share Posted April 27, 2009 To fix the white issue: <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; } h2 { color #ffffff; } --> </style> As far as the form not submitting. It would be helpful to post the actual form code. And as far as "not submitting" does it not enter into the IF or do you not get an email? As they are two separate issues. Quote Link to comment https://forums.phpfreaks.com/topic/155900-simple-problems/#findComment-820632 Share on other sites More sharing options...
Porkie Posted April 27, 2009 Author Share Posted April 27, 2009 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Getrecognized.co.uk - Contact Us</title> <style type="text/css"> <!-- .style1 {font-family: Arial, Helvetica, sans-serif} body,td,th { color: #FFFFFF; } body { background-color: #000000; } --> </style> </head> <body> <p align="center"><img src="images/gr-edit.png" width="604" height="100" /></p> <form id="form1" name="form1" method="post" action="send_contact.php"> <table width="458" height="274" border="0" align="center"> <tr> <td colspan="8"><div align="center" class="style1">Contact Form </div></td> </tr> <tr> <td colspan="3"><span class="style1">Name : </span></td> <td colspan="4"><span class="style1"> <label> <input name="nbox" type="text" id="nbox" size="30" maxlength="30" /> </label> </span></td> <td width="46"><span class="style1"></span></td> </tr> <tr> <td colspan="3"><span class="style1">Email : </span></td> <td colspan="4"><span class="style1"> <label> <input name="ebox" type="text" id="ebox" size="30" maxlength="30" /> </label> </span></td> <td><span class="style1"></span></td> </tr> <tr> <td width="20"> </td> <td width="20"> </td> <td width="43"> </td> <td width="90"> </td> <td width="72"> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><span class="style1"></span><span class="style1"></span><span class="style1">Subject : </span></td> <td colspan="2"><span class="style1"></span><span class="style1"> <label> <input name="sbox" type="text" id="sbox" size="30" maxlength="30" /> </label> </span></td> <td width="69"><span class="style1"></span></td> <td width="64"><span class="style1"></span></td> <td><span class="style1"></span></td> </tr> <tr> <td colspan="3"><span class="style1">Message : </span></td> <td colspan="4" rowspan="3"><span class="style1"> <label> <textarea name="mbox" cols="50" rows="7" id="mbox"></textarea> </label> </span></td> <td><span class="style1"></span></td> </tr> <tr> <td><span class="style1"></span></td> <td><span class="style1"></span></td> <td><span class="style1"></span></td> <td><span class="style1"></span></td> </tr> <tr> <td><span class="style1"></span></td> <td><span class="style1"></span></td> <td><span class="style1"></span></td> <td><span class="style1"></span></td> </tr> <tr> <td colspan="4"><label> <input type="submit" name="Submit" value="Submit" /> <input type="reset" name="Submit2" value="Reset" /> </label></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> <p> </p> </form> <p> </p> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/155900-simple-problems/#findComment-820635 Share on other sites More sharing options...
premiso Posted April 27, 2009 Share Posted April 27, 2009 <input type="submit" name="Submit" value="Submit" /> PHP is CaSe SenSiTiVe on variable names and array indexes. Change the name in the input above to be all lowercase submit and the form should submit. <input type="submit" name="submit" value="Submit" /> Quote Link to comment https://forums.phpfreaks.com/topic/155900-simple-problems/#findComment-820638 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.