Zangeel
10-29-2007, 09:30 PM
Hello!
I have this page. I'm writing a template for restricted access pages, so you have to be logged in to view them. If you aren't logged in you get a login form, the problem is, when you click "Login" It redirects you to the main page, instead of the the page you were trying to veiw. How do I get it to redirect me on the page I was veiwed???
<?php
require "header.php"
?>
<?php
if($userdata['session_logged_in'])
{
echo('You are logged in!');
}
else
{
?>
You are not logged in!<br />
<form action="<?php echo($phpbb_root_path); ?>login.php" method="post" enctype="multipart/form-data">
Username: <input type="text" name="username"><br />
Password: <input type="password" name="password"><br />
<input type="hidden" name="redirect" value="../">
<input type="submit" value="login" name="login">
</form>
<?php
}
?>
</table>
p.s. im also doing a phpbb integration, so i use that login form.
I have this page. I'm writing a template for restricted access pages, so you have to be logged in to view them. If you aren't logged in you get a login form, the problem is, when you click "Login" It redirects you to the main page, instead of the the page you were trying to veiw. How do I get it to redirect me on the page I was veiwed???
<?php
require "header.php"
?>
<?php
if($userdata['session_logged_in'])
{
echo('You are logged in!');
}
else
{
?>
You are not logged in!<br />
<form action="<?php echo($phpbb_root_path); ?>login.php" method="post" enctype="multipart/form-data">
Username: <input type="text" name="username"><br />
Password: <input type="password" name="password"><br />
<input type="hidden" name="redirect" value="../">
<input type="submit" value="login" name="login">
</form>
<?php
}
?>
</table>
p.s. im also doing a phpbb integration, so i use that login form.