Is there a way to program a form on my webpage to collect email address? Like the auto responder services?
I want to put a simple sign-up form on my webpage to get email addresses to build a mailing list. I don’t want to pay for one of those online auto responder services. Any advice would help.
use php. First rename ur page from "urpage.html" to "urpage.php"
the code for this page is as follow:
<?
if (isset($_POST['submit'])) // if form has been submitted
{
$email = $_POST['email']
// the user’s email is stored in variable $email
//now you can send this email address to ur email
//by using the function mail in php like
$to = "recipient@example.com";
$subject = $email;
$body = "email of jusers";
mail($to, $subject, $body);
//or save the $email in SQL
}
?>
<form action="urpage.php" method="post">
<p>Enter ur email:</P>
<input type="text" name="email" maxlength="40">
<input type="submit" name="submit" value="submit">
</form>
if u still need help, feel free to ask




March 10th, 2010 at 6:58 am
use php. First rename ur page from "urpage.html" to "urpage.php"
the code for this page is as follow:
<?
if (isset($_POST['submit'])) // if form has been submitted
{
$email = $_POST['email']
// the user’s email is stored in variable $email
//now you can send this email address to ur email
//by using the function mail in php like
$to = "recipient@example.com";
$subject = $email;
$body = "email of jusers";
mail($to, $subject, $body);
//or save the $email in SQL
}
?>
<form action="urpage.php" method="post">
<p>Enter ur email:</P>
<input type="text" name="email" maxlength="40">
<input type="submit" name="submit" value="submit">
</form>
if u still need help, feel free to ask
References :