My header redirect is not working on the live server

My header redirect is not working on the live server but its work on my localhost,but using the script it redirected to the desired page

This is is my code


		$log=" select * from user where UserName='$user' AND Password='$pass' ";
		$in=mysql_query($log,$con) or die(mysql_error());
			//echo "<script type='text/javascript'>location.href = 'dashboard.php';</script>";
			echo  "<script>alert('Invalid Login')</script>" ;
<!DOCTYPE html>
<html lang="en">
	<meta charset="utf-8">

	<!-- Google Fonts -->
	<link href=',100,300,700|Lato:400,100,300,700,900' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="css/animate.css">
	<!-- Custom Stylesheet -->
	<link rel="stylesheet" href="css/style.css">

	<script src=""></script>
	<div class="container">

		<div class="login-box animated fadeInUp">
			<div class="box-header">
				<h2>Log In</h2>
			<form action="" method="post">
			<label for="username">Username</label>
			<input name="uname" type="text" id="username" >
			<label for="password">Password</label>
			<input name="pwd" type="password" id="password">
			<button name="login" type="submit">Log In</button>
			<!--<a href="#"><p class="small">Forgot your password?</p></a>-->

Are you getting any error messages?

no not any error messages

that sounds like you have output buffering active in your php.ini.

How far does it get on your live server? Does it run the old-style MySQL calls without any trouble and then just not do the redirect?

not do the redirect

how to solve that problem

disable output buffering on your (local) server.

ok i will try that :slight_smile:

After turn of output buffering still its not working???

then check the error logs on your live server.

does it still work locally?

yeah its still working in locally

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.