1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- require "connectionDb.php";
- if (isset($_POST['saveNumber']) && isset($_POST['id']) && isset($_POST['number'])) {
- $id = $_POST['id'];
- $number = $_POST['number'];
-
- $sql ="UPDATE vehicle SET number='$number' WHERE id='$id'";
-
- $db->exec($sql);
- echo '<script>window.location.href="customers.php"</script>';
- }
- ?>
- <style type="text/css">
- .editVehicleForm {
- display: none;
- }
- .editVehicleForm span{
- color:red;
- margin-right: 5px;
- }
- form.form-horizontal.editVehicle.modal-content.animate {
- width: 400px;
- height: 280px;
- margin-left: -15px;
- background-color: #dfe3e6;
- }
- div#editVForm {
- width: 400px;
- height: 280px;
- border-radius: 0.5em;
- margin-top: 100px;
- }
- .form-group.Veditrow1{
- margin-left: 50px;
- }
- .form-group.Veditrow1 input[type='text']{
- border:1px solid grey;
- border-radius: 0.5em;
- height: 35px;
- width: 150px;
- font-size: 14px;
- font-weight: bold;
- color: #337ab7;
- text-align:center;
- margin-left: 15px;
- }
- .form-group.Veditrow1 label{
- color: #610e14;
- font-family:-webkit-pictograph;
- font-size: 15px;
- }
- input.btn.btn-default.editVSave {
- background: radial-gradient(#0da3bb, #04161fc2);
- color: #610e14;
- font-family:-webkit-pictograph;
- font-size: 18px;
- margin-right: 20px;
- width: 70px;
- }
- input.btn.btn-default.editVCancel {
- background: radial-gradient(#b71515eb, #ef0b0bdb);
- color: #fff;
- font-family:-webkit-pictograph;
- font-size:18px;
- width: 78px;
- }
- .form-group.editVBtn {
- margin-left: 30px;
- margin-top: 50px;
- }
- </style>
- <div class="container editVehicleForm modal" id="editVForm">
- <form class="form-horizontal modal-content animate editVehicle" action="" method="post">
- <span onclick="document.getElementById('editVForm').style.display='none'" class="close" title="Close PopUp">×</span>
- <div class="form-group row1">
- <label>Edit Vehicle</label>
- </div>
- <input type="text" name="id" id="vehicle_id" hidden="hidden">
- <div class="form-group Veditrow1">
- <label class="control-label col-sm-3">Number: </label>
- <div class="col-sm-9">
- <input type="text" name="number" id="number">
- </div>
- </div>
- <div class="form-group editVBtn">
- <div class="col-sm-offset-2 col-sm-10">
- <input type="submit" name="saveNumber" class="btn btn-default editVSave" value="Save">
- <input type="button" value="Cancel" class="btn btn-default editVCancel" onclick="document.getElementById('editVForm').style.display = 'none';">
- </div>
- </div>
- </form>
- </div>
|