Jump to content

How to redirect to another page


sheraz

Recommended Posts

Sir, i am trying to redirect toa page after the username and password varification, but it is not working. i have used include() function but it is loading the page in same page. i am using header () function it is not displaying anything.

 

Please guide me how to solve it.

 

Here is the code

 

<?php

 

if($_POST['name']!="" AND $_POST['password']!="" )

{

$nm=$_POST['name'];

$pw=$_POST['password'];

 

$con=mysql_connect("localhost","","");

 

$select=mysql_select_db("tulip");

 

$qry=mysql_query("select * from admin");

 

$result=mysql_fetch_row($qry);

 

if($nm==$result[0] AND $pw==$result[1])

{

 

header('admin.php');

}

else

{

header('errorlog.php');

}

 

}

else

header('errorlog.php');

?>

 

:-\

Link to comment
https://forums.phpfreaks.com/topic/194282-how-to-redirect-to-another-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.