session_start(); $dbServerName = "http://uompgadmissions.com"; $dbUsername = "root"; $dbPassword = "uom@20181916"; $dbName = "uompgnew"; // create connection $conn = new mysqli($dbServerName, $dbUsername, $dbPassword, $dbName); // check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; //echo $db = mysql_connect('http://www.uompgadmissions.com:3306',"root","uom@20181916") or die(mysql_error()); // echo $cnct = mysql_select_db("uompgnew") or die(mysql_error()); if(isset($_POST['submit'])){ $uname=$_POST["email"]; $pwd=$_POST["password"]; echo $sqlquery="select * from admin_users where userName='$uname' and password='$pwd'"; $data=mysqli_query($q,$sqlquery); //$res=mysql_num_rows($data); $rcc=mysqli_fetch_assoc($data); if($rcc==0) { $msg = "Invalid Credentials"; } else { echo $_SESSION['id'] = $rcc['id']; echo $_SESSION['name'] = $rcc['name']; header("location:xml.php"); } } ?>