Log in

View Full Version : Need help badly.


mt_100
04-01-2002, 07:30 PM
I have a site running that uses the vBulletin security for access to non VB pges.

I have a file in the vBulletin directory with the following code in it that I got from a hack here.


<?php

/* Here we check to see if the vBulletin cookie exist.
If it doesn't, we prompt the user to either log in or
sign up*/

if (!$HTTP_COOKIE_VARS["bbuserid"]) {
?>

<table border="0" cellpadding="0" cellspacing="0">
<form action="../vbulletin/member.php" method="post">
<tr>
<td nowrap><smallfont>No Cookies?<br>Enter your Username and Password to Login:</smallfont></td>
</tr><tr>
<td nowrap><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="login">
<input type="text" class="bginput" name="username" size="7">
<input type="password" class="bginput" name="password" size="7">
<input type="submit" class="bginput" value="Login!"></td>
</tr>
</form>
</table>


<?php
exit;
}
?>


I require that file on all my pages.

When a user goes to one of the pages and they are not logged in to vBulletin they get the login boxes and this error:

Warning: Undefined index: bbuserid in c:\inetpub\wwwroot\dealerforge\vbulletin\homelogin .php on line 7

The login boxes work, and if they are logged in they see the page, so everything works but I can't get the error to go away.

Any ideas? Please?

mt_100
04-02-2002, 02:27 PM
Anyone...please?

mt_100
04-02-2002, 05:28 PM
I figured it out.

Change line seven from:

if (!$HTTP_COOKIE_VARS["bbuserid"]) {

to:

if (empty($HTTP_COOKIE_VARS["bbuserid"])) {