View Full Version : Adding a user to mysql using php : confirmation link?

sir pannels
10-08-2002, 02:10 PM
hey there:)
ok so i wrote a php script that connects to mysql.. and creates a new user from a form thats submitted to php_self...and it sends an email to the new user with user details.. is there anyway with that mail icould send a confirmation link.. and the account is n ot active untill this is clicked?
any ideas?

10-08-2002, 04:32 PM
Add a field to Your users table, for example [acc_active] and make it default to false.
Then in the mail body:
<a href="http://someserver/activate.php?account_id=xxx">Activate Your account</a>
In the activate.php get the account_id from the QueryString and reset the [acc_active] field to true for the user corresponding to account_id.
Then redirect the user somewhere else, or just display a message saying that the account has been activated.