Jump to content

IE Header not working. Tested in 5, 7, and 8


daveoffy

Recommended Posts

So on my login-exec.php page it just stops. It doesn't redirect me to the page. In firefox it works fine.

 

<?php

require_once 'config.php';

require_once 'var.php';

if(isset($_POST['Login'])) {

$username = md5($_POST['username']);

$password = $_POST['password'];

if($username == '') {

	header('Location: ../lf.php?reason=invalid');

	exit;

}

if($password == '') {

	header('Location: ../lf.php?reason=invalid');

	exit;

}

$aqry = "SELECT * from members WHERE username_md5='$username' AND active='1'";

$aresult = mysql_query($aqry);

	if($aresult)

	{

		if(mysql_num_rows($aresult) == 0)

		{

			header('Location: ../lf.php?reason=active');

			exit;

		}

	}

$bqry = "SELECT * from members WHERE username_md5='$username' AND banned='1'";

$bresult = mysql_query($bqry);

	if($bresult)

	{

		if(mysql_num_rows($bresult) == 1)

		{

			header('Location: ../lf.php?reason=banned');

			exit;

		}

	}

$qry="SELECT * FROM members WHERE username_md5='$username' AND password='".md5($password)."'";

$result=mysql_query($qry);

if($result)

{

	if(mysql_num_rows($result) == 1)

	{

		$getid = "SELECT id FROM `members`WHERE username_md5='$username'";

		$getidresult = mysql_query($getid);

		while($row = mysql_fetch_assoc($getidresult))

		{

			$username_id = $row['id'];

			mysql_query("UPDATE members SET lastip='".$ip."' WHERE username_md5 = '".$username."'");

			mysql_query("UPDATE members SET last_login='".$date."' WHERE username_md5 = '".$username."'");

			header('Location: ../index.php');

			exit;

		}

		}else {

			header('Location: ../lf.php?reason=invalid');

			exit;

		}

	}

}

?>

Link to comment
Share on other sites

you still test in IE5?  why?

 

and for your "issue", i have no idea what header or what page it doesn't redirect you to, so we're all going to have to wait for you to come back again and explain your issue much better, when you could've just done so the first time.

 

any errors?  anything happen?  anything at all?  when does it "just stop"?  what did you do to make it "just stop"?  etc., etc., etc., etc.

Link to comment
Share on other sites

It stops when you go in IE and login. The page it stops on is login-exec. It doesn't run any of the login commands. It doesn't seem to go in any of the IF statments.

 

There are no given errors on the page. Nothing happens, just a blank white screen on the login-exec.php page.

Link to comment
Share on other sites

the names are case-sensitive.  if your form has name="login" and your check has isset ($_POST['Login']), your script will not function.

 

EDIT: next time, post all relevant code (HTML form).  any number of people on here would've pointed that out immediately and this would've been solved 2 minutes after you began this thread.  guaranteed.  just a note for next time.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.