Re: [PHP] email confirmation script

2003-08-14 Thread Jackson Miller
On Thursday 14 August 2003 12:19, you wrote:
 Thanks for the reply Jackson.

 It's non-profit.
cool

 I guess I'm looking for a randomly generated string that would append to
 the users e-mail address so that it could be matched when the user clicked
 the link and submitted it back for inclusion in the mySQL database.
Oh, ok.  that is much simpler than what i thought you were looking for.

You can generate a unique by doing something like this on the script that 
processes the signup form:
$email = [user_supplied_email];
$secret_variable = something_only_you_know;
$confirmationID = md5($email.$secret_variable);

Then the dynamic url for email confirmation would be something like:
http://your_domain.com/email_verify.php?email=$emailconfirmationID=$confirmationID

Then the email_verify.php page would have something like the following:
?php
$secret_variable = something_only_you_know;
if ($_GET['confirmationID'] = md5($_GET['email'].$secret_variable)) {
// insert the user into the database
} else {
  // display an error message
}
?

If you are collect more than just an email address (i.e. name, password, etc), 
then you will want to insert on the signup script and then update that record 
based on the email address (which should be unique).  You would need to have 
a field in your member table that denotes pending and active pages.

Hope this helps,
-Jackson



 If the e-mail address was bogus - the user wouldn't recieve the note from
 the server.

 If the e-mail address was valid - but the user didn't -in fact - supply it
 - say it was suplied from someone else - chances are it would be discarded.

 If the e-mail address was valid - and the user did supply it - a randomly
 generated string would be appended to the e-mail address for a match into
 mySQL.

 Please advise.
 Thank you.
 TR

 ---
 [This E-mail scanned for viruses by gonefishingguideservice.com]

-- 
jackson miller
 
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
 
 
cold feet presents Emma
the world's easiest email marketing
Learn more @  http://www.myemma.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] email confirmation script

2003-08-14 Thread Anthony Ritter
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=namebr
input type=text name=emailbr
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:[EMAIL PROTECTED]/email_verify.php?email=$emailc
onfirmation_ID=$confirmation_IDlink/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
}
?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] email confirmation script

2003-08-14 Thread Anthony Ritter
Hi,
I'm trying to find a script that does the following:

1. A user is presented with a form with a textbox for their e-mail address.
2. The user types in their e-mail addrees and submits the form.
3. A note is then sent from that server if their e-mail address , in fact,
exists.
3. If the e-mail address does exist - the user receives a note.   The user
is then presented with a link which they click to confirm and their e-mail
address in then inserted into the database.

I've searched through google for:
e-mail, confirmation, php, etc.

and have not come up with anything.

If anyone has code that I could look at, I would greatly appreciate it.

Many thanks,
Tony Ritter




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] email confirmation script

2003-08-14 Thread Anthony Ritter
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: [EMAIL PROTECTED]
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 PROTECTED]
efishingguideservice.comconfirmation_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=namebr
Your e-mail address:br
input type=text name=emailbr
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_IDCLICK/a;
 $secret_variable = something_only_you_know;
 $confirmation_ID = md5($email.$secret_variable);
 $to=[EMAIL PROTECTED];
 $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
}
?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] email confirmation script

2003-08-14 Thread olinux
Read the manual notes for mail() and find out how to
send html messages.
www.php.net/mail

or better - just send a text message
make your link shorter though so the link won't break.


olinux


--- Anthony Ritter [EMAIL PROTECTED]
wrote:
 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: [EMAIL PROTECTED]
 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 PROTECTED]
 efishingguideservice.comconfirmation_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=namebr
 Your e-mail address:br
 input type=text name=emailbr
 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_IDCLICK/a;
  $secret_variable = something_only_you_know;
  $confirmation_ID = md5($email.$secret_variable);
  $to=[EMAIL PROTECTED];
  $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
 }
 ?
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php