Connecting Tech Pros Worldwide Forums | Help | Site Map

mail() IE vs Firefox

Dave Pyles
Guest
 
Posts: n/a
#1: Jul 17 '05
I'm trying to make a form work, which it does from Firefox (and
Netscape) but not from Internet Explorer.

The form is simple:
<form action="register.php" method="post"><p>';

print '
<p class="txtni">All Fields below are required:</p>
<span class="txtni">First Name:</span> <input type="text"
name="first_name" size="20" value="' . $_POST['first_name'] . '" /> <br />
<span class="txtni">Last Name:</span> <input type="text"
name="last_name" size="20" value="' . $_POST['last_name'] . '" /><br />
<span class="txtni">Email Address:</span> <input type="text"
name="email" size="40" value="' . $_POST['email'] . '" /><br /><br />
<span class="txtni">Phone Number:</span> <input type="text" name="phone"
size="20" value="' . $_POST['phone'] . '" /></p>
....
some instructions...

<p><span class="txt">Your Message:</span> <textarea "name="message"
cols="80" rows="5" value="' . $_POST['message'] . '"
/></textarea></span></p>
<p align="center"><input type="submit" name="submit" value="Send email
to Volunteer Coordinators!" /></p>
</form>'

I'm using the following to send the form results:

$body="Another Happy Volunteer has signed up,
Name: {$_POST['first_name']} {$_POST['last_name']}\n
Phone Number: {$_POST['phone']}\n
Email Address: {$_POST['email']}\n
Message: {$_POST['message']}";

mail("mail@address.com", 'Another Happy Volunteer Had Signed Up',$body,
"From: mail@addreess.com\r\n"."Reply-To: {$_POST['EMAIL']}");


When the form is sent via IE the field named "message" is dropped from
the email. When it's sent from Mozilla browsers the email is complete.

Does anyone have a clue why this works when sent from the Mozilla
browsers but not when sent from IE? Any clues as to how I might resolve
the problem.

Dave Pyles

Oli Filth
Guest
 
Posts: n/a
#2: Jul 17 '05

re: mail() IE vs Firefox


Dave Pyles said the following on 09/06/2005 00:07:[color=blue]
> I'm trying to make a form work, which it does from Firefox (and
> Netscape) but not from Internet Explorer.
>[/color]
<...SNIP CODE...>[color=blue]
>
> When the form is sent via IE the field named "message" is dropped from
> the email. When it's sent from Mozilla browsers the email is complete.
>
> Does anyone have a clue why this works when sent from the Mozilla
> browsers but not when sent from IE? Any clues as to how I might resolve
> the problem.[/color]

What does the HTML that's produced look like? i.e. if you do View Source
in your browser, does the HTML look like you'd expect it to?

Also, change the script so that it echoes out some diagnostics so that
you check what values you're receiving.


--
Oli
ECRIA Public Mail Buffer
Guest
 
Posts: n/a
#3: Jul 17 '05

re: mail() IE vs Firefox


1. In PHP associative array keys are case sensitive -

use:
"From: mail@addreess.com\r\n"."Reply-To: {$_POST['email']}");
instead of:
"From: mail@addreess.com\r\n"."Reply-To: {$_POST['EMAIL']}");

2. You have a " before your name property in the message text field of your
form, which causes it to be ignored as a field on form submission in IE.

use:
<textarea name="message"
instead of:
<textarea "name="message"

ECRIA
http://www.ecria.com


Dave Pyles
Guest
 
Posts: n/a
#4: Jul 17 '05

re: mail() IE vs Firefox


On 6/8/2005 7:50 PM, ECRIA Public Mail Buffer wrote:[color=blue]
> 1. In PHP associative array keys are case sensitive -
>
> use:
> "From: mail@addreess.com\r\n"."Reply-To: {$_POST['email']}");
> instead of:
> "From: mail@addreess.com\r\n"."Reply-To: {$_POST['EMAIL']}");
>
> 2. You have a " before your name property in the message text field of your
> form, which causes it to be ignored as a field on form submission in IE.
>
> use:
> <textarea name="message"
> instead of:
> <textarea "name="message"
>
> ECRIA
> http://www.ecria.com
>
>[/color]
Thank You!! Thank You!! Thank You!!

Dave
Closed Thread