<?php
session_start();
 require_once("dBconn.php");
 $dBcon= new  dBconn();
$ownID="";
if( isset($_POST['email']) && isset($_POST['pwd']) ){
 

$username=$_POST['email'];
//md5()
$password=$_POST['pwd'];
if($username!="" && $password !=""){
$rQ=$dBcon->login($username,$password);
if ($rQ->rowCount()>0) {
	$Dr=$rQ->fetch();
	 $ownID=$Dr['userid'];	
	 echo "<script> window.location.href='lostPhoneInfos.php?id=$ownID' </script>";
}
else{

	$r="Invalid username or password!.";
	
    echo "<script> window.location.href='loginforms.php?id=$r' </script>";
}

}
else{
$r="Both username and password required!.";
	
	echo "<script> window.location.href='loginforms.php?id=$r' </script>";

}
}
else{
	$r="Both username and password required!.";
	
	echo "<script> window.location.href='loginforms.php?id=$r' </script>";
}

