RegiLoginAbou

Please full fill all requirement"; } if($_POST['pwd']!=$_POST['cpwd']) { $msg.="
  • Please Enter your Password Again....."; } if(!ereg("^[a-z0-9_]+[a-z0-9_.]*@[a-z0-9_-]+[a-z0-9_.-]*\.[a-z]{2,5}$",$_POST['mail'])) { $msg.="
  • Please Enter Your Valid Email Address..."; } if(strlen($_POST['pwd'])>10) { $msg.="
  • Please Enter Your Password in limited Format...."; } if(is_numeric($_POST['fnm'])) { $msg.="
  • Name must be in String Format..."; } if($msg!="") { header("location:register.php?error=".$msg); } else { $fnm=$_POST['fnm']; $unm=$_POST['unm']; $pwd=$_POST['pwd']; $gender=$_POST['gender']; $email=$_POST['mail']; $contact=$_POST['contact']; $city=$_POST['city']; $query="insert into user(u_fnm,u_unm,u_pwd,u_gender,u_email,u_contact,u_city) values('$fnm','$unm','$pwd','$gender','$email','$contact','$city')"; mysqli_query($conn,$query) or die("Can't Execute Query..."); header("location:register.php?ok=1"); } } else { header("location:index.php"); } ?>

    //Login

    Error:-
    '; foreach($msg as $k) { echo '
  • '.$k; } } else { $unm=$_POST['usernm']; $q="select * from user where u_unm='$unm'"; $res=mysqli_query($conn,$q) or die("wrong query"); $row=mysqli_fetch_assoc($res); if(!empty($row)) { if($_POST['pwd']==$row['u_pwd']) { $_SESSION=array(); $_SESSION['unm']=$row['u_unm']; $_SESSION['uid']=$row['u_pwd']; $_SESSION['status']=true; if($_SESSION['unm']!="admin") { header("location:index.php"); } else { header("location:admin/index.php"); } } else { echo 'Incorrect Password....'; } } else { echo 'Invalid User'; } } } else { header("location:index.php"); } ?>

    //process logout