PHP script not working in IE!!

toasterthegamer

New Member
Messages
61
Reaction score
0
Points
0
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.. :happysad:

My website is:
http://nanotech.pcriot.com/

Code:
<?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="http://forums.x10hosting.com/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
 
Last edited:

wh00p101

New Member
Messages
241
Reaction score
0
Points
0
What happens when you view it in IE? I would view it but currently where I'm located it is blocked by a firewall.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
PHP scripts aren't browser dependant, if anything it may be a cookie fault
 

toasterthegamer

New Member
Messages
61
Reaction score
0
Points
0
When you try to login in instead of login in like it does in firefox it just goes to forum/login.php and dosnt login in at all.... It looks fine just the script isnt working right oh and i posted my website so you could see whats happening

And if you cant view it cause it blocks you try a proxy like vtunnel.com

-Toasterthegamer
 

tsukunase

New Member
Messages
40
Reaction score
0
Points
0
Just entered random stuff. I figured if it would just go to login.php, it would show the login box again instead of "invalid password/username"
 

toasterthegamer

New Member
Messages
61
Reaction score
0
Points
0
Just entered random stuff. I figured if it would just go to login.php, it would show the login box again instead of "invalid password/username"

It's suppose to say "invalid password/username" sigh I really dont know whats wrong i have a feeling this code is some sorta of firefox working code only.. :happysad:
 

alfred

New Member
Messages
87
Reaction score
0
Points
0
Yes, but I had something similar in the past. A firewall security feature prevented me from logging in from one site and using that (phpsession) for another.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Works fine for me...

Perhaps you could use /forum/login.php instead of forum/login.php
 

toasterthegamer

New Member
Messages
61
Reaction score
0
Points
0
Maybe but it's like IE is completely ignoring the form command!! It's really getting on my nerves do any of you guys know the differences between IE and firefox HTML wise... :happysad:
 

eminemix

Member
Messages
350
Reaction score
0
Points
16
That's strange when i try to log in in the IE 7 it get's me to http://nanotech.pcriot.com/forum/login.php and no message
When i try the same in firefox it sais
You have specified an incorrect or inactive username, or an invalid password.

But i think it's not a php issue.

Later edit : Try to make your code be ok with the www.w3.org markup validation service .

Go here to verify your code it has errors.
 
Last edited:

toasterthegamer

New Member
Messages
61
Reaction score
0
Points
0
Thanks for the link I just worked on fixing some of the errors it popped out. There's some i cant fix like the "<< previous" and "next >>" thats for the cutenews script and it thinks I am trying to start a tag.. :nuts:

I've gotten rid of all the errors in the login box area... Still wont work in IE there's some warnings for these though...

Code:
[LIST=1]
[*]           [IMG]http://validator.w3.org/images/info_icons/warning.png[/IMG]         [I]Line 50, Column 24[/I]:         reference to non-existent ID "username".							<div><label for="[B]u[/B]sername">username</label>: <input type="text" name="use           [URL="http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fnanotech.pcriot.com%2F;errmsg_id=183#errormsg"]✉[/URL]     
           This error can be triggered by:
     [LIST]
[*]A non-existent input, select or textarea element
[*]A missing id attribute
[*]A typographical error in the id attribute[/LIST]     Try to check the spelling and case of the id you are referring to.
   
[*]           [IMG]http://validator.w3.org/images/info_icons/warning.png[/IMG]         [I]Line 51, Column 24[/I]:         reference to non-existent ID "password".							<div><label for="[B]p[/B]assword">password</label>: <input type="password" name=[/LIST]

I'll do a google search see if I cant fix them.

Edit: I just fixed those too not working in IE or firefox now.. Posting my code again..
Code:
<?php
//the stuff in this if statement is the problem I cant find out whats Wrong!!!
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" id="login">
						<div id="login-username">
							<div><label for="username">username</label>: <input type="text" id="username" /></div>
							<div><label for="password">password</label>: <input type="password" id="password" /></div>
						</div>
						<div id="login-button">
							<input type="hidden" name="redirect" value="../index.php" />
							<input type="image" src="http://forums.x10hosting.com/images/btn_login.gif" value="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
   }
//this stuff all works bellow in both IE and firefox..

if( $userdata['session_logged_in'] ) // Is the user logged in?
   {
    $appendLogout = $u_login_logout = $phpbb_root_path.'login.'.$phpEx.'?logout=true&amp;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
?>
Thats all the code for the login but it's not working!! ARGHHH :frown:

-Toasterthegamer
 
Last edited:
Top