Can someone help me with this HTML code?

  • Thread starter Thread starter mamdouh e
  • Start date Start date
M

mamdouh e

Guest
I am making a simple site where people input their email address in a box and submit it to me so I can email them something. I need an HTML code that will allow me to receive that email (preferably on MY email address). Can someone tell me the code? Here is the code I have so far, made by Blake Kimball:
<form id="emailsubmit" name="email" method="post" action="submit.php">
<table border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center"><input name="email" type="text" class="textfield" id="email" size="35" maxlength="100" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Submit" /></td>
</tr>
</table>
</form>

Thank you for your help (P.S. my computer programming knowledge is VERY little, but I want to learn)!
 
in submit.php you should have


<?php
$to = "your [email protected]";
$subject = "mail";
$message = $_post ["email"];
$from = $_post ["email"];
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

just wrote this in the spur of the moment so it may need to be refined.
 
in submit.php you should have


<?php
$to = "your [email protected]";
$subject = "mail";
$message = $_post ["email"];
$from = $_post ["email"];
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

just wrote this in the spur of the moment so it may need to be refined.
 
Back
Top