<?php
ob_start();
define('IN_PHPBB', true);
$phpbb_root_path = 'forum/'; //Relative path to your PHPBB2 installation
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
if( !$userdata['session_logged_in'] ) // Is the user NOT logged in?
{
?>
<h2 class="login"><em>user</em>login</h2>
<form action="forum/login.php" method="post" name="login">
<div id="login-username">
<div><label for="username">username</label>: <input type="text" name="username"></div>
<div><label for="password">password</label>: <input type="password" name="password"></div>
</div>
<div id="login-button">
<input type="hidden" name="redirect" value="../index.php">
<input type="image" src="images/btn_login.gif" value="login" name="login">
</div>
<div class="clear">
<div class="reg">
New User? <a href="http://nanotech.pcriot.com/forum/profile.php?mode=register">REGISTER for FREE</a>
</div>
</div>
</form>
<?php
}
if( $userdata['session_logged_in'] ) // Is the user logged in?
{
$appendLogout = $u_login_logout = $phpbb_root_path.'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']; // Add the session ID to the logout link
echo "<center>Welcome back, <a href=\"forum/profile.php?mode=viewprofile&u=".$userdata['user_id']."\" title=\"".$userdata['username']."\">".$userdata['username']."</a>!<br />"; // Show a welcome message
echo "<a href=\"forum/privmsg.php?folder=inbox\" title=\"You have ".$userdata['user_unread_privmsg']." new messages\">(".$userdata['user_unread_privmsg'].") New Messages</a><br />"; // Any new PMs?
echo "<a href=\"forum/profile.php?mode=editprofile\" title=\"My Profile\">My Profile</a><br />"; // Edit your profile link
echo "<a href=\"".$appendLogout."\" title=\"Logout\">Logout</a><br />"; // Logout link
} // end if, if you want you could add a login form in an else statement below
?>
</center>
[web] PHP code wont work in IE!!
I have some code that will not work in IE works fine in firefox and I was wondering if you guys could help me out with it..
Thanks for any help!!
-Toasterthegamer
Exactly what part isn't working? Do you get an error message? It's odd that you say it doesn't work in IE when PHP runs on the server side, not the client side. Is it the behavior of the form that isn't working correctly?
At the top of the script you have ob_start(), which starts output buffering (ie, output data is stored in memory, not sent to the browser).
Either remove it or stick ob_end_flush() at the end of your script. It might be something phpBB requires for some odd reason, though...
Either remove it or stick ob_end_flush() at the end of your script. It might be something phpBB requires for some odd reason, though...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement