Re: email confirmation script
| From: | Anthony Ritter | Date: | Thu, 14 Aug 2003 19:02:34 +0000 |
| Subject: | Re: email confirmation script | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159609@lists.php.net to get a copy of this message | ||
Thanks Jackson.
I appreciate the assistance.
Am I on the right track?
Best...
TR
......................
// this is the form
<html>
<body>
<form action="post" method="process.php">
<p>
Your e-mail address:<br>
<input type="text" name="name"><br>
<input type="text" name="email"><br>
<input type="submit" name="submit" value="submit">
</body>
</form>
</html>
...............
//process.php
<?
if ($email)
{
$secret_variable = "something_only_you_know";
$confirmationID = md5($email.$secret_variable);
$body = "Thank you for registering $name \n;";
$body .= "Please click on the <a
href=mailto:tony@gonefishingguideservice.com/email_verify.php?email=$email&c
onfirmation_ID=$confirmation_ID>link</a>"
mail($_POST['email'],'Thank you',$body,'From: Us Fish');
}
...............
//email_verify.php
<?
if ($_GET['confirmationID'] = md5($_GET['email'].$secret_variable)) {
// insert the user into the database
} else {
// display an error message
}
?>