<?php
session_start();
require 'connection/conn.php';

if(isset($_POST['submit']))
{
	$m=$_POST['m'];
	$p=$_POST['pass'];
	$check="select * from `user` where `user_mobile`='$m' and `user_password`='$p'";
	$check_r=$conn->query($check);
	if($row=mysqli_fetch_array($check_r))
	{
		$_SESSION['user']=$row['user_id'];
		$_SESSION['name']=$row['full_name'];
		$_SESSION['pos']=$row['user_position'];
		$_SESSION['fullname']=$row['full_name'];
		
		echo "<script type='text/javascript'>
		           window.location.href='home.php'
		        </script>";
	}
	else{
		  echo " <script type='text/javascript'>
              alert ('incorect password')
		  </script>";	  
	}
}
?>
<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <link rel="icon" type="image/jpg" href="icon/logo.png">
  <title>SB</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="assets/css/login.css">

</head>
<body>
<table width=100%  border=0 dir=ltr>
	<tr>
	<td colspan=3 style="text-align:center;"><img src="icon/logo.jpg" width=350px style=" position: relative;"><hr></td></tr>
	</tr>
	
</table><form action="" method="post">
<div class="container" onclick="onclick" >
  <div class="top"></div>
  <div class="bottom"></div>
  <div class="center" style="font-family:'Rabar_043';">
						<form action="" method="post">
						<br><br><input type="text" style="font-size:20pt; width:250px"name="m" placeholder="ژمارەی مۆبایل" required><br><br>
						<input type="password" style="font-size:20pt; width:250px" name="pass" placeholder="ووشەی تێپەڕ"   required ><br>
						<!--<input type="text" name="pass" placeholder="Password"  pattern=".{8,}" title="eight or more" required >-->
						<br>
						<input style="font-size:20pt; width:250px; background-color:#000000; color:#ffffff" type="submit"   name="submit" value="چوونەژوورەوە">       
						</form>
				