2009-06-16, 08:03 PM
hey my mybb dir is : www.haifafans.net/fanclub/
wordpress will be here : www.haifafans.net
i use this code :
i put it as Widget in wordpress ( html )
and when i save i check the site , the login form look like this :
whats wrong ?
i test the code in normal php page its working
http://www.haifafans.net/login.php
i sucess login , but when i go back to http://www.haifafans.net/login.php
still ask me to put username and pass , i can't see this :
Hey, $mybbuser[username]. Thanks for logging in
wordpress will be here : www.haifafans.net
i use this code :
<?php
chdir('fanclub'); // path to MyBB
define("IN_MYBB", 1);
require './global.php';
?>
<?php
if($mybb->user['uid'])
{
// The user is logged in, say Hi
echo "Hey, $mybbuser[username].<br>
Thanks for logging in.";
}
else
{
// The user is not logged in, Display the form
echo "<form action='fanclub/member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='index.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form><br>";
}
?>
i put it as Widget in wordpress ( html )
and when i save i check the site , the login form look like this :
whats wrong ?
i test the code in normal php page its working
http://www.haifafans.net/login.php
i sucess login , but when i go back to http://www.haifafans.net/login.php
still ask me to put username and pass , i can't see this :
Hey, $mybbuser[username]. Thanks for logging in