i am struggling with one problem i.e if current task will going to true how to redirect from one page another page. actually i tried with “header” but it is not taking me into another page please find my mistake and let me inform the solution…..
[B]here is my code
$dbhost=’localhost’;
$dbuser=’root’;
$dbpass=”;
$conn=mysql_connect($dbhost,$dbuser,$dbpass);
if(isset($_POST[“insert”]))
{
$uname=$
$eid=$_POST[“eid”];
$phno=$
$pass=$_POST[“psw”];
$pass1=md5($pass);
$quli=$
$years=$_POST[“years”];
$mnth=$
$indu=$_POST[“indu”];
$lookingfor=$
$sql=”SELECT username FROM registration WHERE username=’$uname'”;
mysql_select_db(‘goget’);
$retval=mysql_query($sql,$conn);
$r=mysql_fetch_array($retval);
if($r[0] == $uname)
{
require(“home.php”);
}
else
{
$e=”insert into registration(username,emailid,phnumber,password,qualification,years,months,industry,looking_for) values(‘$uname’,’$eid’,’$phno’,’$pass1′,’$quli’,’$years’,’$mnth’,’$indu’,’$lookingfor’)”;
$f=mysql_query($e,$conn);
header(“Location:
exit;
}
mysql_close($conn);
}