<?php require('includes/head.php');
require 'connection/conn.php';
 if(isset($_POST['submit']))
 {
     
	 $n=$_POST['name'];
	 //$n2=$_POST['name2'];
	 $m=$_POST['mobile'];
	 $a=$_POST['address'];
	$c=$_POST['cat'];
	$cur=$_POST['cur'];
	
	 $add="insert into `customer`( `customer_name`,  `customer_address`, `customer_mobile`,`user`,`cat`,`currency`)
     values('$n','$a','$m','$user','$c','$cur')";
	 $conn->query($add);
	
	 
	 
	 
	 
	 
	  echo "<script type='text/javascript'>
		           window.location.href='customer_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">

	
	<tr style="border: solid 1px red; ">
		<td style=" font-size:22pt">ناو</td><td><input type="text" name="name" required style="width:300px"></td>
	</tr>
	
	<tr style="border: solid 1px red; ">
		<td style=" font-size:22pt">مۆبایل</td><td><input type="number" name="mobile" required style="width:300px"></td>
	</tr>
	<tr style="border: solid 1px red; ">
		<td style=" font-size:22pt">ناونیشان</td><td><input type="text" name="address" required style="width:300px"></td>
	</tr>
	<tr style="border: solid 1px red; ">
		<td style=" font-size:22pt">جۆر</td><td><select name="cat" required style="width:300px"><option value="n" >داخلی</option><option value="d">خاریجی</option></select></td>
	</tr>
	<tr style="border: solid 1px red; ">
		<td style=" font-size:22pt">عملة</td><td>
						<select name="cur" required style="width:300px">
						
							<option value="$">$</option>
							<option value="IQD">IQD</option>
						
						</select>
					</td>
	</tr>
	<tr style="border: solid 1px red; ">
		<td></td><td><input type="submit" name="submit" value="زیاد کردن" style="width:300px"></td>
	</tr>
  </table>
 
</form>

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