PDA

View Full Version : Get username from VB3 cookie...


benroles
07-05-2004, 08:13 PM
... how do you do this? (read the username from the cookie).

Regards,
Ben.

Andreas
07-05-2004, 08:37 PM
Pseudo-Code:

$userid = intval($_COOKIE[COOKIE_PREFIX . 'userid']);
if ($userid) {
$res = mysql_query("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = $userid");
// Do smth.
}

benroles
07-06-2004, 07:18 PM
Thanks! I actually realised something similar but your code did help!

Cheers,
B.

Cold Steel
07-06-2004, 08:43 PM
See this thread:

https://vborg.vbsupport.ru/showthread.php?t=61953

And if you actually want to use the usernames and passwords in the vb database, see:

https://vborg.vbsupport.ru/showthread.php?t=66735