Preview: edit-customer.php
Size: 8.94 KB
/home/urbanman/roadkaraja.in/manager/edit-customer.php
<?php
error_reporting(0);
@session_start();
include("common.php");
include("../config.php");
$id = $_GET[id];
$data="select * from customer where id='$id'";
if(!($row=mysql_query($data))){echo mysql_error($data); exit;}
$rowcustomer=mysql_fetch_assoc($row);
?>
<!-- START: Main Content-->
<main>
<div class="container-fluid">
<!-- START: Breadcrumbs-->
<!-- END: Breadcrumbs-->
<!-- START: Card Data-->
<div class="row row-eq-height">
<div class="col-12 mt-3">
<div class="card h-100">
<div class="card-header">
<h4 class="card-title"> edit Customer </h4>
</div>
<div class="card-content">
<div class="card-body py-5">
<form class="form-row" action="submit-customer.php" method="post">
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCity">Customer Name</label>
<input type="text" name="cname" class="form-control" value="<?php echo $rowcustomer[customer_name];?>" placeholder="Enter Customer Name" id="cname">
</div>
<div class="form-group col-md-3">
<label for="inputCity">Mobile Number 1</label>
<input type="number" maxlength="10" name="mobile" class="form-control" value="<?php echo $rowcustomer[customer_mobile];?>" placeholder="Enter 10 digit Mobile Number" id="mobile">
</div>
<div class="form-group col-md-3">
<label for="inputCity">Mobile Number 2</label>
<input type="number" maxlength="10" name="mobile2" class="form-control" value="<?php echo $rowcustomer[mobile2];?>" placeholder="Enter 10 digit Mobile Number" id="mobile2">
</div>
<div class="form-group col-md-6">
<label for="inputCity">Vehicle Number </label> <br>
<input type="text" value="<?php echo $rowcustomer[vehicle_number];?>" name="vnumber" style="text-transform:uppercase;" maxlength="13" class="form-control" placeholder="Vehicle Number: MH40CS0786" id="vnumber">
</div>
<div class="form-group col-md-3">
Vehicle Type
<select name="vehicletyp" style="width:200px" id="vehicletyp" class="form-control" required>
<option value="">Select </option>
<?php
$que2=sprintf("select * from vtype");
if (!($page1 = mysql_query($que2))) { echo "FOR QUERY: $strsql<BR>".mysql_error(); exit;}
while($rowshow=mysql_fetch_array($page1)){?>
<option value="<?php echo $rowshow['vtype'];?>"<?php if($rowshow['vtype']==$rowcustomer['vehicletyp']){echo 'selected="selected"';}?>><?php echo $rowshow['vtype'];?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-6">
<label for="inputCity">Route – From and To </label>
<input type="text" value="<?php echo $rowcustomer[routefrom];?>" name="routefrom" style="height:33px;border-radius:4px;border:1px solid #ddd;" placeholder="Enter Route From " id="routefrom">
<input type="text" value="<?php echo $rowcustomer[routeto];?>" name="routeto" style="height:33px;border-radius:4px;border:1px solid #ddd;" placeholder="Enter Route To" id="routeto">
</div>
<div class="form-group col-md-6">
Urea Required
<select name="urea" style="width:200px" id="urea" class="form-control" required>
<option value="">Select Urea Required</option>
<option value="Yes" <?php if ($rowcustomer[urea]=="Yes") echo 'selected="selected"';?>>Yes </option>
<option value="No" <?php if ($rowcustomer[urea]=="No") echo 'selected="selected"';?>>No </option>
</select>
</div>
<div class="form-group col-md-4">
<label for="inputCity">Company Name</label>
<input type="text" name="companyname" class="form-control" value="<?php echo $rowcustomer[companyname];?>" placeholder="Enter Company Name" id="companyname">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Owner Name</label>
<input type="text" name="owner" class="form-control" value="<?php echo $rowcustomer[owner];?>" placeholder="Enter Owner Name" id="owner">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Owner Mobile</label>
<input type="text" maxlength="10" name="ownermobile" value="<?php echo $rowcustomer[ownermobile];?>" class="form-control" placeholder="Enter Owner Mobile" id="ownermobile">
</div>
<div class="form-group input-primary col-sm-12 mb-4">
<input type="text" hidden name="fueltyp" value="Petrol/Disel" id="fueltyp">
<input type="radio" hidden checked name="cardtyp" value="Regular Card" id="cardtyp">
<input type="submit" class="btn btn-primary" value="Submit"> </button>
<?php $id = $_GET[id]; if($id==""){?>
<input type="hidden" value="add" name="mode" >
<?php }else{?>
<input type="hidden" value="<?php echo $id;?>" name="id" >
<?php }?>
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- END: Card DATA-->
</div>
</main>
<!-- END: Content-->
<!-- START: Back to top-->
<a href="#" class="scrollup text-center">
<i class="icon-arrow-up"></i>
</a>
<!-- END: Back to top-->
<!-- START: Template JS-->
<script src="dist/vendors/jquery/jquery-3.3.1.min.js"></script>
<script src="dist/vendors/jquery-ui/jquery-ui.min.js"></script>
<script src="dist/vendors/moment/moment.js"></script>
<script src="dist/vendors/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="dist/vendors/slimscroll/jquery.slimscroll.min.js"></script>
<script src="dist/vendors/flag-select/js/jquery.flagstrap.min.js"></script>
<!-- END: Template JS-->
<!-- START: APP JS-->
<script src="dist/js/app.js"></script>
<style>
.btn4{
padding:8px;
background-color:#00bcd4;
color:#fff;
border-radius:20px;
padding-left:20px;padding-right:20px;
border:2px solid #00bcd4;
box-shadow:0 4px 10px 0 rgba(0,0,0,0.3);
}
</style>
<!-- END: APP JS-->
</body>
</html>
Directory Contents
Dirs: 5 × Files: 59