/    Sign up×
Community /Pin to ProfileBookmark

Email form works in firefox, not IE

Hello,

This is my first foray into php and I hope I follow all the rules of posting my question.

I have a simple code that will allow me to e-mail a resume to an address. The code seems to work just fine in Firefox, but when I try to load the page in IE, I get no response from clicking the “submit” button.

Any info would be greatly appreciated. Thank you in advance

Scott

The Code

<?
function checkOK($field)
{
if (eregi(“r”,$field) || eregi(“n”,$field)){
die(“Invalid Input!”);
}
}

$Name=$_POST[‘Name’];
checkOK($Name);

$Email=$_POST[‘Email’];
checkOK($Email);

$Address=$_POST[‘Address’];
checkOK($Address);

$Position=$_POST[‘Position’];
checkOK($Position);

$Skills=$_POST[‘Skills’];
checkOK($Skills);

$History=$_POST[‘History’];
checkOK($History);

$Other=$_POST[‘Other’];
checkOK($Other);

$to=”[email protected]“;
$message=”$Name just submitted a resume.nn

Their e-mail address is: $Addressn

Their mailing address is: n$Emailnn

The position they are applying for is: n$Positionnn

They have the following skills: n$Skillsnn

This is their work history: n$Historynn

And these are their final comments: n$Othernn
” ;

if(mail($to,”Submitted resume”,$message,”From: $Namen”)) {
echo “Thank you for your resume. Please click the back button in your browser to return to the previous page.”;
} else {
echo “There was a problem sending the mail. Please check that you filled in the form correctly.”;
}
?>

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@chazzyApr 26.2006 — if the page isn't loading, there's something wrong w/ your form, not the php.
Copy linkTweet thisAlerts:
@NogDogApr 27.2006 — It might be a good idea to run your form page through the HTML validator and make sure it's not malformed.

http://validator.w3.org/

(Sometimes if you have a syntax error, one browser might get luckier at "guessing" what you meant than another one does.)
Copy linkTweet thisAlerts:
@SpectreReturnsApr 27.2006 — I'm seeing this script everywhere, where's it coming from? Quite bad PHP too...
Copy linkTweet thisAlerts:
@Still_Learning2authorApr 28.2006 — Thanks...it would appear that it was a validation error. I spent a few hours going through error by error and it is now working.

Thanks again

Scott
×

Success!

Help @Still_Learning2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...