redarrow Posted June 12, 2008 Share Posted June 12, 2008 Advance thank you... This is part of a page that is included to a template for emailing clients, and for us to get, orders....... The problam is all works on FIREFOX but not ie please help cheers.... Buy the way, When the code is included to the template, All the html is valadated with no errors or warnings......... In ie you can press the button and the page dosent do nothink just go from enquire page to index page, no valadating nothink at all please help......... <?php session_start(); if ($_POST['submit']) { $address1=$_POST['address1']; $address2=$_POST['address2']; $name=$_POST['name']; $email=$_POST['email']; $phone_number=$_POST['phone_number']; $enquire_type=$_POST['enquire_type']; $post_code=$_POST['post_code']; $note=$_POST['note']; if (empty($name)||(empty($email)||empty($phone_number)||($equire_type=="none")|| (empty($post_code)) ||(empty($note)))){ echo "<center><p><font color='red'>WARNING!.......<BR>Sorry please fill in all the form!<br> Please try it again!</font></p></center>"; } if(!preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email) ){ echo "<center><p><font color='red'>WARNING!.......<BR>Sorry your email issint valid!!<br> Please try it again!</font></p></center>"; } $secCode = isset($_POST['secCode']) ? strtolower($_POST['secCode']) : ""; if ($secCode == $_SESSION['secCode']) { $mess="<table align='center'><tr><td><center><h1> NEW ".str_replace('_',' ',$enquire_type)." </h1></center><br><br> Name: <br> $name <br><br> Telephone Number: <br> $phone_number <br><br> Client Email: <br> $email <br><br> Client Address: <br> $address1 <br> $address2 <br> $post_code <br><br> Enquire Type: <br> ".str_replace('_',' ',$enquire_type)." <br><br> client enquire notes: <br> $note<br><td><tr></table>"; $to = 'admin@what_ever.co.uk'; $subject = 'Client Enquire '.str_replace('_',' ',$enquire_type).''; $message = $mess; $headers = "From: $email\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; if(mail($to, $subject, $message, $headers)){ $mess1="<br><br>Hi there $name, We are dealing with your enquire ".str_replace('_',' ',$enquire_type)." <br><br> We will contact you via $phone_number shortly. <br><br> Thank you for using us at www.what_ever.co.uk<br><br> Visit us now! <a href='http://www.what_ever.co.uk'>Pc Computer Maintenance - Audio Visual Installation - Flat Pack Assembling</a>"; $to1 = $email; $subject1 = 'Your Enquire '.str_replace('_',' ',$enquire_type).' Note!'; $message1 = $mess1; $headers1 = "From: Your Enquire At www.faironprice.co.uk\r\n" .'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; mail($to1, $subject1, $message1, $headers1); $_SESSION['name']=$name; header("location: /thank_you.php"); exit; unset($_SESSION['secCode']); $result = true; } }else{ echo "<center><p><font color='red'>WARNING!.......<BR>Sorry the security code is invalid!<br > Please try it again!</font></p></center>"; $result = false; } } ?> <table style="background: #808080; border-width: thick; height: 200px; width: 550px;" align="center"> <tr> <td valign="top" align="center"> <form method="POST" action=" "> Name / Surname: <br> *<input type="text" name="name"> <br><br> Valid Email: <br> *<input type="text" name="email"> <br><br> Phone Number: <br> *<input type="text" name="phone_number"> <br><br> Address 1a: <br> *<input type="text" name="address1"> <br> Address 1b: <br> *<input type="text" name="address2"> <br><br> Post Code: <br> *<input type="text" name="post_code"> <br><br> Enquire Type: <br> *<select name="enquire_type"> <option value="none">Please Select One</option> <option value="genral_enquire">Genral Enquire</option> <option value="flat_pack_enquire">Flat Pack Enquire</option> <option value="computer_enquire">Computer Enquire</option> <option value="audio_enquire">Audio Visual Enquire</option> </select> <br><br> Please State Enquire! <br> <textarea rows="20" cols="60" name="note"></textarea> <br><br> <img src="secuity_code.php" alt=" " > <br><br> Enter Security Code: <br> Case Sensitive <br> <br> <input name="secCode" type="text" size="10" > <br><br> <input type="submit" name="submit" value="Send Enquire!"> </form> </td> </tr> </table> <br><br> Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/ Share on other sites More sharing options...
ober Posted June 12, 2008 Share Posted June 12, 2008 Since PHP is not a client side language, this has nothing to do with PHP. It has everything to do with your form. Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564079 Share on other sites More sharing options...
redarrow Posted June 12, 2008 Author Share Posted June 12, 2008 what wrong with the form please........... <table style="background: #808080; border-width: thick; height: 200px; width: 550px;" align="center"> <tr> <td valign="top" align="center"> <form method="POST" action=" "> Name / Surname: <br> *<input type="text" name="name"> <br><br> Valid Email: <br> *<input type="text" name="email"> <br><br> Phone Number: <br> *<input type="text" name="phone_number"> <br><br> Address 1a: <br> *<input type="text" name="address1"> <br> Address 1b: <br> *<input type="text" name="address2"> <br><br> Post Code: <br> *<input type="text" name="post_code"> <br><br> Enquire Type: <br> *<select name="enquire_type"> <option value="none">Please Select One</option> <option value="genral_enquire">Genral Enquire</option> <option value="flat_pack_enquire">Flat Pack Enquire</option> <option value="computer_enquire">Computer Enquire</option> <option value="audio_enquire">Audio Visual Enquire</option> </select> <br><br> Please State Enquire! <br> <textarea rows="20" cols="60" name="note"></textarea> <br><br> <img src="secuity_code.php" alt=" " > <br><br> Enter Security Code: <br> Case Sensitive <br> <br> <input type="text" name="secCode" size="10" > <br><br> <input type="submit" name="submit" value="Send Enquire!"> </form> </td> </tr> </table> <br><br> Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564082 Share on other sites More sharing options...
redarrow Posted June 12, 2008 Author Share Posted June 12, 2008 got it thank god it was not having the current page.php name in the form.... but if you come up inproving the form cheers or php code.. Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564106 Share on other sites More sharing options...
rhodesa Posted June 12, 2008 Share Posted June 12, 2008 if you are posting to the same page remove the action attribute all together, it will default to itself Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564109 Share on other sites More sharing options...
redarrow Posted June 12, 2008 Author Share Posted June 12, 2008 i am being told that the secuity code not showing on ie or firefox but it is my end any idears please...... Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564119 Share on other sites More sharing options...
trq Posted June 12, 2008 Share Posted June 12, 2008 Read the replies. If your code works in one browser but not another it is a client side issue, not php, wrong board. Link to comment https://forums.phpfreaks.com/topic/109927-firefox-code-works-not-ie-please-help/#findComment-564124 Share on other sites More sharing options...
Recommended Posts