The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Define cookie index?
Hey guys. I'm trying to include a login/logout in my homepage that uses que vbulletin cookies to check the user.
Note: my main site is located in the root folder, and the forums are located inside a "forums" sub-folder. The code inside main.php is the following: Code:
if (($_COOKIE['bbuserid'] != NULL) or ($_COOKIE['bbpassword'] != NULL)) { $userid = $_COOKIE['bbuserid']; $sqlusername = mysql_query ("SELECT username FROM user WHERE userid = $userid",$link); $userdata = mysql_fetch_array ($sqlusername); $username = $userdata[0]; $t->set_var(array( "USERNAME" => $username)); $t->parse("LOGIN","main_logoff",true); } else { $t->parse("LOGIN","main_login",true); } Notice: Undefined index: bbuserid in C:\...\main.php on line 191 Notice: Undefined index: bbpassword in C:\...\main.php on line 191 I think the code is right but...do I have to define those indexes in the server's environment options??? Of course this only happens when the user is logued out, because the code can't finde those indexes inside the cookie. Do I need to declare them somewhere and set them to null? Thanks a million Topper |
#2
|
|||
|
|||
Could you please post your php info (can be found in the last menu item in your ACP).
And which is line 191, the first one? Edit: Try first with the following line in the top of your script (just after the "<?php"): PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|