The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Cant extract info from cookie
Hey,
My forums are located in a directory and not a subdomain: http://www.domain/forums I need to use the username and password from the cookie, in other areas of my website, so I changed the name of the cookie to: .domain.com Searched the forums and found some code (used for extracting data from the cookie). I modified it a little, so it fit my needs: //Select the forum database mysql_select_db ("perfume_forums"); $userid = intval($_COOKIE[bbuserid]); $password = addslashes($_COOKIE[bbpassword]); $result = mysql_query("SELECT username, userid FROM user WHERE userid=$userid AND MD5(CONCAT(password, 'LicenseNo')) = '$password'"); $user = mysql_fetch_array($result); if ($user[userid]) { //echo "<input name='user_name' type='hidden' value='$user[userid]'>"; echo "User: ".$user[username]; } else { echo "<input name='user_name' type='text' class='rating-form' maxlength='20'>"; } - why doent this work? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|