Jump to content

Recommended Posts

Hi All, My mail function is working perfectly on all browsers except IE, could you help me finding out why is this?... I thought i need different headers but still getting same problem. when clicking on the send button of my form the page doesnt work at all but if i try it from firefox or any other browser it works just fine!... any idea?  :(,.. here is my code

 

<?php

// at the start of your script

error_reporting(E_ALL);

init_set('display_errors', '1');

 

 

/*Subject and Email variables */

 

$emailSubject = 'New Customer Inquery from www.Franksmusicvideo.com!';

$webMaster = '[email protected]';

 

/* Gathering Data Variables */

 

$emailField = $_POST['email'];

$nameField = $_POST['name'];

$phoneField = $_POST['phone'];

$eventField = $_POST['event'];

$commentsField = $_POST['comments'];

 

 

$body = <<<EOD

<br><hr><br>

Email: $emailField <br>

Name: $nameField <br>

Phone Number: $phoneField <br>

Event: $eventField <br>

Comments: $commentsField <br>

EOD;

 

$headers = "MIME-Version: 1.0" . "\r\n";

$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

$headers = "From: $email\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($webMaster, $emailSubject, $body, $headers);

 

/*Results rendered as HTML */

 

$theResults = <<<EOD

<html>

<head>

<title>sent message</title>

<meta http-equiv="refresh" content="3;URL=http://www.franksmusicvideo.com/ContactUs.htm">

<style type="text/css">

<!--

body {

background-color: #444;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 20px;

font-style: normal;

line-height: normal;

font-weight: normal;

color: #fec001;

text-decoration: none;

padding-top: 200px;

margin-left: 150px;

width: 800px;

}

-->

</style>

</head>

<div align="center">Your email will be answered soon as possible!

You will return to Frank Music & Video in a few seconds !</div>

</div>

</body>

</html>

EOD;

echo "$theResults";

?>

Link to comment
https://forums.phpfreaks.com/topic/198272-mail-function-not-working-in-ie/
Share on other sites

php is server side,it must work in all browsers if your code is valid php. it might not work because your IE cache is on, remember to delete your history before concluding its an error. your basic html may also be at fault. so the information may not be displaying properly

 

  I turned the cache off and still getting same issue. when I click on the reset button or submit nothing happens, the page remains the same.... dont know what i'm missing...

 

here is my html code:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Frank's Music & Video - Productions</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="css/layout-contactus.css" rel="stylesheet" type="text/css">

</head>

 

<body bgcolor="#000025" background="images/backg6.jpg">

<div id="wrapper">

  <div id="logo">

    <div align="center"><a href="index.htm"></a></div>

  </div>

  <div id="navigation"> <a href="index.htm"> Home </a> | <a href="Services.htm">Services

    </a>| <a href="ProGallery.htm">Pro Gallery</a> | <a href="Bios.htm">Bios</a>  |<a href="ContactUs.htm">Contact

    Us</a> </div>

  <div id="HeaderImage">

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="798" height="265">

      <param name="movie" value="flash/Flogov2.swf">

      <param name="quality" value="high">

      <embed src="flash/Flogov2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="798" height="265"></embed></object>

  </div>

  <div id="bodyArea">

  <h1><strong> Contact Us</strong></h1>

  <h3> For immediate assistance Call: (732) 277-2413

</h3>

  <form action="phpproccess.php" method="post">

<table width="800" border="1" cellspacing="5">

  <tr>

    <td><div align="right">Email</div></td>

    <td><input name="email" type="text" size="35" maxlength="90"> </td>

  </tr>

  <tr>

    <td><div align="right">Name:</div></td>

    <td><input name="name" type="text" size="35" maxlength="90"></td>

  </tr>

  <tr>

    <td><div align="right">Phone </div></td>

    <td><input name="phone" type="text" size="35" maxlength="12"></td>

  </tr>

  <tr>

    <td><div align="right">Event</div></td>

    <td><form name="event" method="post" action="">

            <p>

              <label>

              <input type="radio" name="event" value="Wedding">

              Wedding</label>

              <br>

              <label>

              <input type="radio" name="event" value="Birthday Party">

              Birthday Party</label>

              <br>

              <label>

              <input type="radio" name="event" value="Sweet Sixteen">

              Sweet Sixteen</label>

              <br>

              <label>

              <input type="radio" name="event" value="Bar/Bat Mitzvahs">

              Bar/Bat Mitzvahs</label>

              <br>

              <label>

              <input type="radio" name="event" value="Anniversaries">

              Anniversaries</label>

              <br>

              <label>

              <input type="radio" name="event" value="Graduations ">

              Graduations </label>

              <br>

            </p>

          </form></td>

  </tr>

  <tr>

    <td><div align="right">Comments</div></td>

    <td><textarea name="comments" cols="50" rows="5"> </textarea></td>

  </tr>

  <tr>

    <td><div align="right">

            <input name="Reset Form" type="reset" value="Reset Form">

          </div></td>

    <td><input name="Send" type="submit" value="Send Info"></td>

  </tr>

</table>

</form>

      <p><em><font color="#666666" size="2" face="Times New Roman, Times, serif">© 1990-2010 Frank's Music & Video Productions</font></em> </p>

      </div>

</div>

</div>

</body>

</html>

Might it have something to do with the nested <form> tags? I'm not sure that's valid markup to begin with, and only one set has an action declared; Internet Exploder may be choking on that and cratering.

Actually I just have 2 forms  embedded like:,

<form action="phpproccess.php" method="post">

 

<input name>

<input name>

<input name>

<input name>

  <form name="event" >

<input type>

<input type>

<input type>

<input type>

  </form>

<textarea></textarea>

 

</form>

 

 

Yep forms can't be embedded (they can't be within another form).

 

http://validator.w3.org/

 

You can copy and paste code into the validator there. Strictly speaking, every page should be valid. Part of my testing runs this validator on every page on my website before I publish pages live - this means if something doesn't work at least it's the fault of the browser and not me!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.