Sign in to follow this  

[web] PHP code wont work in IE!!

This topic is 3731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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..
<?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>



Thanks for any help!! -Toasterthegamer

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

This topic is 3731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this