PDA

View Full Version : PASSING PARAMETER to PHP from EMAIL


modeler4547
08-02-2004, 09:56 AM
I am working on a verification scheme. I have gotten to the part where the user registers and submits from a form. This automatically emails the user's inputted email address.
What can I put in this email that will pass the username of the user to the target of a link in the email?
I would like it so when he clicks on the link in the email that I sent him, his username is passed to the php file to which the link points. This php file sends a YES to a field called email_verified in my SQL database.
Thanks,
RAS
:)

tky
01-27-2005, 09:24 PM
use "get" method.
such as adding the following line:
<a href="http://www.xxx.com/verified.php?verify=yes">Please click here to verify your email address</a>

tky
02-22-2005, 12:16 AM
or maybe you should create a database to keep all the unverified email address, together with a unique key, a timestamp.
Then, the link should look something like this:

<a href="http://www.xxx.com/verified.php?verify=12345678abcd12345678">Please click here to verify your email address</a>


where 12345678abcd12345678 is the unique key.
the unique should not be in a running numerical format. You can join primary key (which usually is auto-increment number) with timestamp to create a unique key.

Then by comparing the unique key, you can get the corresponding email address.