EditStatus.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. // require "connectionDb.php";
  3. // if (isset($_POST['edit']) && isset($_POST['id']) && isset($_POST['username']) ) {
  4. // $id = $_POST['id'];
  5. // $username = $_POST['username'];
  6. // $creditSale = $_POST['creditSale'];
  7. // //$vehicle_id = $_POST['vehicle_id'];
  8. // //$number = $_POST['number'];
  9. // $sql ="UPDATE customer SET name='$username',credit_sale='$creditSale' WHERE id='$id'";
  10. // //$sql2 ="UPDATE vehicle SET number='$number' WHERE id='$vehicle_id'";
  11. // $db->exec($sql);
  12. // //$db->exec($sql2);
  13. // echo '<script>window.location.href="index.php"</script>';
  14. // }
  15. ?>
  16. <style type="text/css">
  17. .editStatus {
  18. display: none;
  19. }
  20. </style>
  21. <div class="container editStatus" id="editStatus">
  22. <form class="form-horizontal" action="" method="post">
  23. <div class="form-group">
  24. <label class="control-label col-sm-2"> Id </label>
  25. <div class="col-sm-10">
  26. <input type="number" name="id" id="id">
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="control-label col-sm-2"> Status </label>
  31. <div class="col-sm-4">
  32. <select class="col-sm-6" name="status" id="status">
  33. <option value="Successful">Successful</option>
  34. <option value="Canceled">Canceled</option>
  35. </select>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <div class="col-sm-offset-2 col-sm-10">
  40. <input type="submit" name="edit" value="Submit">
  41. <input type="button" value="Cancel" onclick="document.getElementById('editStatus').style.display = 'none';">
  42. </div>
  43. </div>
  44. </form>
  45. </div>