Hi Adwin,
I don't know if this'll help you but the way I've done it on my site is to send out a confirmation email with a link the user needs to follow to confirm. The link ends with two GET variables, one being the username and one being a unique number created for their account at time of registration.
Eg xxxxxxx.org/verify.php?username=monkey&id=1D21xepFkk465
When the link is followed, the php page 'verify.php' includes something a little like this
//*******
$query = "SELECT * FROM members WHERE username='$_GET[username]' AND id='$_GET[id]'";
$result = mysql_query($query) or die();
$num_results = mysql_num_rows($result);
if ($num_results == "1") { // Set authorisation to yes // Send email / Display confirmation message } else { // Display failure message } *******//
I'm sure there are better ways of doing it than this but I find this works effectively for what I need.
Also, you can give the recipient an easy way to unregister if someone has added them to your databse against their wishes through either a switch function or a separate page
eg:
To confirm, click here: .....org/verify.php?action=confirm&user=&id=
To remove yourself, click here: .......org/verify.php?Action=remove&user=&id=
---------------
switch ($action)
{
case remove :
// MySQL remove
case confirm :
// MySQL confirm
OR
To confirm, ....org/confirm.php?username=&id= To remove, ....org/remove.php?username=&id=
Hope this helps?
adwin wijaya wrote:
Hi all :)
I want to create a system to process the email that coming. For example, I send a confirmation email to our client and they just simply reply the email that we send to them to verify. The problem I got, I dont know how to process the email that coming to our mailbox and process the message inside with PHP.
can someone recommend me a PHP class that has been created for handling this task ?
-- ------------------------------------------------------ David Green Information Centre, Central Science Laboratory Sand Hutton, York, YO41 1LZ
Phone: +44 (0)1904 462388 (GTN: 5129 2388) Fax: +44 (0)1904 462111 E-Mail: d.green@xxxxxxxxxx ------------------------------------------------------ CSL email disclaimer: http://www.csl.gov.uk/email.htm
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php