PHP Emails Send Automatically On Page Load in IE

Discussion in 'PHP' started by latoya, Mar 31, 2007.

  1. #1
    I created a Contact page using HTML and PHP that allows user to send an email to me. After the user fills in the form and clicks a button to send the email, he/she is taken to a confirmation page that says the email has been sent.

    The problem is that in IE, the PHP script to send the email automatically executes when the Contact page is loaded, sending a blank email to me, and showing the user the email confirmation page (the user never sees the Contact page because of this).

    Anyone know what the problem could be?

    This is the code from the .html page

    <form method="post" action="contact.php">
    Name:<br>
    <input type="text" name="Name" size=40><br><br>
    Email Address:<br>
    <input type="text" name="EmailAddress" size=40><br><br>
    Subject:<br>
    <input type="text" name="Subject" size=40><br><br>
    Question/Comment:<br>
    <textarea name="Request" rows=4 cols=40></textarea><br><br>
    <input type="submit" value="Send">  <input type="reset" value="Reset">
    Code (markup):
     
    latoya, Mar 31, 2007 IP
  2. latoya

    latoya Active Member

    Messages:
    749
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    70
    #2
    I figured out the issue. It wasn't a problem with the PHP at all. I didn't close out the form tag. :)
     
    latoya, Mar 31, 2007 IP
  3. metallic07039

    metallic07039 Peon

    Messages:
    272
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Anytime its a browser issue the problem is never with server-side coding.
     
    metallic07039, Mar 31, 2007 IP