<?php require('includes/head.php');
require 'connection/conn.php';
 if(isset($_POST['submit']))
 {
  
	 
	 $n=$_POST['n'];
	 $u=$_POST['u'];
	 $p=$_POST['p'];
	 $t=$_POST['t'];

	 $add="INSERT INTO `user`(`full_name`, `user_mobile`, `user_password`, `user_position`) VALUES ('$n','$u','$p','$t')";
	 $conn->query($add);
	  echo "<script type='text/javascript'>
		           window.location.href='user_list.php'
		        </script>";
 }

?>
<div class="container">
          <div class="page-inner">
            <div class="page-header">
              <h3 class="fw-bold mb-3">بەکارهێنەری تازە</h3>
              <ul class="breadcrumbs mb-3">
                <li class="nav-home">
                  <a href="home.php">
                    <i class="icon-home"></i>
                  </a>
                </li>
                <li class="separator">
                  <i class="icon-arrow-right"></i>
                </li>
                <li class="nav-item">
                  <a href="#"></a>
                </li>
                <li class="separator">
                  <i class="icon-arrow-right"></i>
                </li>
                <li class="nav-item">
                  <a href="#"></a>
                </li>
              </ul>
            </div>
            <div class="row">
              <div class="col-md-12">
                <div class="card">
                  
                  <div class="card-body">
                    <div class="table-responsive">
                      <table
                        id="basic-datatables"
                        class="display table table-striped table-hover"
                      >
<form action="" method="post">

<thead >
	<tr>
		<td>ناو:</td><td><input type="text" name="n" required></td>
	</tr>
	<tr bgcolor="lightblue">
		<td>بەکارهێنەر:</td><td><input type="text" name="u" required></td>
	</tr>
	<tr>
		<td>پاسوۆرد:</td><td><input type="text" name="p" required></td>
	</tr>>
	<tr>
		<td>ناونیشان:</td><td><select name="t" required><option value=4>Cashier</option><option value=3>User</option><option value=2>Admin</option><option value=1>SuperAdmin</option></select></td>
	</tr>
	<tr bgcolor="lightblue">
		<td></td><td><input type="submit" name="submit" value="زیاد کردن"></td>
</tr></table>
   
</form>


</div>
                  </div>
                </div>
              </div>
			  
			  </div>
          </div>
        </div>
<?php require'includes/foot.php';?>