Jump to content

user and email match on php...


luvrockz

Recommended Posts

i use a user management system which can be download this from http://rapidshare.com/files/39584153...LL-DGT.zip.rar

 

i also have a script which emails a link to the entered email address.... i want it to check if the entered email matches with the logged in users email on the database.....

this email script can be downloaded from

http://rapidbay.net/download/1364276...kurl-v1-7.html

 

 

as im totally new to php i wud appriciate if u cud explain a lil bit.. pls help....

Link to comment
https://forums.phpfreaks.com/topic/208779-user-and-email-match-on-php/
Share on other sites

Dude,

 

I would say you need to customize the system by editing the core. I'm sure your session variable will have the info about the logged in user. So write a script that will do a small validation just before sending mail.

 

script may be like this

 

$mail = $_POST['mail_id'];

$query = mysql_query("select email_id from user_table where user_id = ".$_SESSION['user_id']);

$user_email = mysql_result($query, 0);

if($mail == $user_email){

// do required when entered email ID == logged in user's mail ID

}

else{

// do required when entered email ID != logged in user's mail ID

}

 

------ hope im in the right track

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.