if($_POST['Login']=="Login") { $uname=$_POST['uname']; $pword=$_POST['pword']; if($uname=='' or $pword=='') { $err='Enter Username and Password'; } else { $checkrec=mysql_query("select * from members where uname='$uname' and pword='$pword'"); if(mysql_num_rows($checkrec)>0) { $_SESSION['uname']=$uname; $_SESSION['pwd']=$pword; //header("Location: listbuyrent_propertydesc.php"); //header("Location: buy.php"); header("Location: user/index.php"); } else { $err="Invalid Username and Password"; } } } ?>