View next topic
View previous topic
Post new topic   Reply to topic
Author Message
digatle




Joined: Feb 07, 2006
Posts: 13

PostPosted: Wed Mar 22, 2006 7:11 am
Reply with quote

I've got a form that I am able to extract the userID from their cookie to set it as a value:

cookiedecode($user);
$username = $cookie[1];

<input type=\"hidden\" name=\"Commissioner\" value=\"$username\">

Is there a way I can do the exact same thing but to look up their E-mail address so I can have this line added?

<input type=\"hidden\" name=\"Email\" value=\"$email\">

Thanks for the input.
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 756

PostPosted: Wed Mar 22, 2006 12:41 pm
Reply with quote

yeah, use this to get their email....


Code:

cookiedecode($user);
$username = $cookie[1];

$result = $db->sql_query("SELECT user_email FROM ".$user_prefix."_users WHERE username='$username'");
list($user_email) = $db->sql_fetchrow($result);


<input type=\"hidden\" name=\"Commissioner\" value=\"$username\">

<input type=\"hidden\" name=\"Email\" value=\"$user_email\">

 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours