I'm trying to allow members of my forum to sign in from the pages of my website. I'm pretty sure I have the php coding correct, it just isn't working. I know very little about what I'm doing so any help is MUCH appreciated.
Heres my problem:
I sign with a correct user name and password and when I hit the log in button it just dumps me right to my else condition as if I weren't logged in. My code is:
Session Management that is at the top of both the page i'm logging in from and the page I want to go to after a log in.
define('IN_PHPBB', true);
$phpbb_root_path = './forums/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
?>
my forums are located in my forum directory so that part is correct.
then on the page you get taken to after a log in i have:
if( $userdata['session_logged_in'] )
{
<html content>
}
else
{
echo('Please Login');
}
my syntax seems to be correct I just can't get the log in to actually work.
my form code that I'm logging in with is. (exactly as it appears on the page)
<form action="login.php" method="post"><font color=white face=verdana size=2>Username:</font></td>
<td width=140><input type="text" name="username" size=15> </td>
</tr>
<tr>
<td width=30><font color=white face=verdana size=2>Password:</font></td>
<td width=140><input type="password" name="password" size=15 ></td>
</tr>
<tr>
<td width=60></td>
<td>
<input type="submit" value="login" name="login"></form>
I've hit a major wall as I have no idea on where to go from here so any help would great.
Thanks in advance.