email confirmation script

From: Date: Fri, 15 Aug 2003 03:20:17 +0000
Subject: email confirmation script
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-159626@lists.php.net to get a copy of this message
This is what I receive via e-mail after I click submit using the following code. As you can see - the html attribute <a href= shows up and the whole string in linked. All I was looking for is a link to the URL and the word - Click - to be underlined showing the link. Additionally, the value (as in key/value) part of confirmation_ID is nowhere to be found in the query string. Thank you for any assistance. Tony Ritter ..................................... // This is what I get back via e-mail: ----- Original Message ----- From: <Us> To: <tony@gonefishingguideservice.com> Sent: Thursday, August 14, 2003 2:04 PM Subject: Thank you for registering > Thank you for registering tony > > <a href="http://www.gonefishingguideservice.com/email_verify.php?email=tony@gon efishingguideservice.com&confirmation_ID=">Click</a> --------------------------------------------- /*the .html form which takes a name and an e-mail address */ <html> <body> <form action="process_a.php" method="post"> <p> Your name:<br> <input type="text" name="name"><br> Your e-mail address:<br> <input type="text" name="email"><br> <input type="submit" name="submit" value="submit"> </body> </form> </html> ............... /*process_a.php: which receives the name and email variables. The script then tries to then send the note back to the user with a link - called CLICK. When the user hits the link to email_verify.php the email address is inserted into the database*/ <? $msg = "Thank you for registering $name\n\n"; $msg .= "<a href=\"http://www.gonefishingguideservice.com/email_verify.php?email=$email& confirmation_ID=$confirmation_ID>CLICK</a>"; $secret_variable = "something_only_you_know"; $confirmation_ID = md5($email.$secret_variable); $to="tony@gonefishingguideservice.com"; $subject="Thank you for registering"; $mailheaders="From: Us"; mail($to,$subject,$msg,$mailheaders); ?> ............. // email_verify.php <? if ($_GET['confirmation_ID'] = md5($_GET['email'].$secret_variable)) { // insert the user into the database } else { // display an error message } ?>

« previous php.general (#159626) next »