Jump to content

Recommended Posts

Here's my form:

 

<form name="contact" method="post" action="email.php" id="form">

        <div align="left">Name:

                <INPUT TYPE="text" NAME="name" SIZE="40">

                <br>

                <br>

            Phone:

                        <input type="text" name="phone" size="39">

          <br>

            <br>

            E-mail:

            <INPUT TYPE="text" NAME="email" SIZE="40">

            <br>

            <br>

            How can we help you:

            <SELECT NAME="need" SIZE="1">

              <OPTION SELECTED>Choose One...

                  <OPTION>Want to sell my home

                  <OPTION>Want to buy a home

                      <OPTION>Loan Information

                      <OPTION>Credit Repair

  <OPTION>Help! I'm in Foreclosure!

                          <OPTION>Other (see comments)

                        </SELECT>

            <br>

            <br>

            Please list the cities you are interested in:<br>

                        <textarea name="cities" rows=4 cols=50></textarea>            

          <br>

  Comments:<br>

                        <textarea name="comments" rows=4 cols=50></textarea>

<br>

         

         

            <INPUT TYPE="submit" name="esubmit" value="Send" style="cursor:pointer">

            <INPUT TYPE="reset" value="Clear">

        </div>

    </form>

 

 

Here's my php process:

 

<script type="text/javascript">

<!--

function delayer(){

    window.location = "http://www.hr-realestate.info"

}

//-->

</script>

</head>

 

<body onLoad="setTimeout('delayer()', 5000)">

<?php

 

  //Some variables

  $mymail = "mymail@hotmail.com";

  $name = $_POST['name'];

  $phone = $_POST['phone'];

  $email = $_POST['email'];

  $need = $_POST['need'];

  $cities = $_POST['cities'];

  $comments = $_POST['comments'];

 

  //Mail Processing

  if ($_POST['esubmit']) {

   

      $body = "Name: " . $name;

  $body .= "\nEmail: " . $email;

  $body .= "\nPhone: " . $phone;

  $body .= "\nCities: " . $cities;

  $body .= "\n\n" . $comments;

 

      mail($mymail,$need,$body,"From: $name <$email>");

      echo "<p>Thank you! Someone will contact you shortly. <br><br>";

      echo "You will be redirected back to our homepage in a few seconds.";

      echo "</p>";

    }

 

 

?>

</body>

 

 

 

Does the code look right?  I'm not getting any emails with this

Link to comment
https://forums.phpfreaks.com/topic/63221-php-email-what-am-i-doing-wrong/
Share on other sites

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.