<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{

include 'dbc.php';
$username=$_SESSION["username"];
$id=$_REQUEST["id"];
$subtypename=$_REQUEST["subtypename"];
$userid=$_SESSION["userid"];
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		
		
		 $my=$month_name . " " . $year;
		 $sql2 = "SELECT * FROM customer where id = '$id' and user_id = '$userid'";
$result2=$conn->query($sql2);
$row2 = $result2->fetch_assoc();
$pname=$row2['pname'] ;
$bname=$row2['bname'] ;
$phoneno=$row2['phoneno'] ;
$cellno=$row2['cellno'] ;
$watsappno=$row2['watsappno'] ;
		$ctype=$row2['ctype'] ;
$city=$row2['city'] ;
$email=$row2['email'] ;
$address=$row2['address'] ;
$ntnno=$row2['ntnno'] ;
$saletaxno=$row2['saletaxno'] ;
		
?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

    <?php include("includes/menu.php") ?><!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        <header id="header" class="header">

             <?php include("includes/customer_menu.php") ?>

        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="col-sm-6">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><? echo "" . $_SESSION["userid"]; ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li class="active"><? echo "" . $_SESSION["username"]; ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="content mt-3">

           


          <div class="col-lg-12">
                        <div class="card">
                            <div class="card-header"><strong>Update Customer</strong><small> Form</small></div>
                            <div class="card-body card-block">
							<form action="Edit_Customer_Save.php" method="post" enctype="multipart/form-data" class="form-group">
							
								<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label">ID</label>
                                  <input type="text" id="id" name="id" placeholder="id" class="form-control" value="<? echo $id ?>"></div>
								</div>
												
																
												<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label">Person Name</label>
                                  <input type="text" id="pname" name="pname" placeholder="Person Name" class="form-control" value="<? echo $pname ?>"></div>
								</div>
												
									
	
								
								<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label"> Business Name</label>
                                  <input type="text" id="bname" name="bname" placeholder="Business Name" class="form-control" value="<? echo $bname ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  Phone No </label><input type="text" id="phoneno" name="phoneno" placeholder="Phone No" class="form-control" value="<? echo $phoneno ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  Cell No </label><input type="text" id="cellno" name="cellno" placeholder="Cell No" class="form-control" value="<? echo $cellno ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  Whatsapp No </label><input type="text" id="watsappno" name="watsappno" placeholder="Whatsapp No" class="form-control" value="<? echo $watsappno ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  Customer Type </label><input type="text" id="ctype" name="ctype" placeholder="Customer Type" class="form-control" value="<? echo $ctype ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  City </label><input type="text" id="city" name="city" placeholder="City" class="form-control" value="<? echo $city ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group"><label for="feedisc1" class=" form-control-label">  Address </label><input type="text" id="address" name="address" placeholder="Address" class="form-control" value="<? echo $address ?>"></div>
								</div>
								<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label"> Email </label>
                                  <input type="text" id="email" name="email" placeholder="Email" class="form-control" value="<? echo $email ?>"></div>
								</div>
								
								<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label"> NTN No </label>
                                  <input type="text" id="ntnno" name="ntnno" placeholder="NTN No" class="form-control" value="<? echo $ntnno ?>"></div>
								</div>
								
								<div class="col-3">
                                <div class="form-group">
                                  <label for="feedisc1" class=" form-control-label"> Sale Tax No </label>
                                  <input type="text" id="saletaxno" name="saletaxno" placeholder="Sale Tax No " class="form-control" value="<? echo $saletaxno ?>"></div>
								</div>
								
		
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i> Upda Costomer
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
                                            </div>

            


        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php

}
?>