someone help please =)
Im getting this error:
Code:
Unable to add cookies, header already sent.
File: /home/invictus/public_html/rbar1_info.php
Line: 4
here is my current code:
top page
Code:
<?
chdir("forum/");
include('forum/global.php');
// added this line to include the user functions which
// has the fetch_avatar_url() function
include('./includes/functions_user.php');
chdir("../");
?>
where i want login
Code:
<?
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
// i assigned the avatar url to the variable $user_av and check to see if it's empty.
$user_av = fetch_avatar_url($bbuserinfo['userid']);
if($user_av!='')
$user_av="/forum/" . $user_av; //replace "/forum/" with your virtual path to your forum pages.
print("<align='center'><span class='sectionheader'>Welcome back, $username!<br>");
//if the avatar url is not empty, display it
if($user_av!='')
print("<img src=\"" . $user_av . "\" vspace=4>");
} else {
?>
<form action='/forum/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'>
<script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>
<span class="sectionheader">Username:</span>
<input type='text' class='button' name='vb_login_username' id='navbar_username' size='15' accesskey='u' tabindex='1' value='' onfocus='if (this.value == 'username') this.value = '';' /><br>
<span class="sectionheader">Password: </span>
<input type='password' class='button' name='vb_login_password' size='15' accesskey='p' tabindex='2' /><br>
<input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='sectionheader'>Remember Me</span><br>
<input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' />
<input type='hidden' name='do' value='login' />
<input type='hidden' name='forceredirect' value='1' />
<input type='hidden' name='vb_login_md5password' />
</form>
<?
}
?>