Jump to content

problems with php mail


dubfoundry

Recommended Posts

I have this seeamingly simple code that does not execute at all for some reason...i cant figure it out. im using godaddy for hosting and im trying to send a mail via a form...Godady says it doesnt block these type of scripts and it should work...go figure..

 

Is there a problem with my script preventing it from working?

 

 

     

<?php

echo  "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\">

        <p>Full Name:<br/>

          <label>

            <input type=\"text\" name=\"name\" id=\"name\" />

            <br />

          </label>

         

         

          Email:<br/> 

          <label>

            <input type=\"text\" name=\"email\" id=\"email\" />

            <br />

          </label>

         

          Phone:<br/> 

          <label>

            <input type=\"text\" name=\"phone\" id=\"phone\" />

          </label>

        <p>Message:<br/> 

          <label>

            <textarea name=\"message\" cols=\"23\" rows=\"10\" id=\"message\"></textarea>

          </label>

        </p>

        <p>

          <label>

            <input type=\"Submit\" name=\"Submit\" id=\"Submit\" value=\"Submit\" />

          </label>

        </p>

</form>";

 

if(isset($_GET['Submit'])){

$subject = "Consultation Request";

$myEmail ="[email protected]";

$message = $_GET['message'];

$phone = $_GET['phone'];

$Name = $_GET['name'];

$email =  $_GET['email'];

$mail_body = "From: ". $Name . " <" . $email . ">\r\n". $message." ";

 

echo "Thank you";

mail($myEmail, $subject, $mail_body);

 

 

}else{

echo "Please Fill the form out";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/166279-problems-with-php-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.