Нема описа

editExperience.php 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!--
  2. Developer: Coralys Cubero Rivera
  3. Fall 2018
  4. This file is meant to be for editing the information stored on a selected experience. At the
  5. end of the editing, the information will be sent to another script to be updated.
  6. Updated by: Víctor A. Hernández
  7. Summer 2019
  8. -->
  9. <?php
  10. require_once 'processes/config.php';
  11. require_once 'processes/dbh.inc.php';
  12. include_once 'header.php';
  13. if (isset($_GET['edit'])) {
  14. $query = "SELECT * FROM `experience` WHERE `id`=".$_GET['edit'].";";
  15. $result = mysqli_query($connection, $query);
  16. if(!$result) die("Error: ".mysqli_error($connection));
  17. $row = mysqli_fetch_array($result);
  18. }
  19. ?>
  20. <!-- START OF editExperience.php -->
  21. <div class='container'>
  22. <h2>Experience <?php echo $row[0]; ?></h2>
  23. <form class='form-horizontal' action='updateExperience.php' method='POST'>
  24. <!-- ID -->
  25. <input type='hidden' name='id' value='<?php echo $row[0]; ?>'>
  26. <!-- NEW TITLE -->
  27. <div class='form-group'>
  28. <label class='control-label col-sm-2'>Title:</label>
  29. <div class='col-sm-10'>
  30. <input type='text' class='form-control' name='newTitle' value='<?php echo $row[1]; ?>'>
  31. </div>
  32. </div>
  33. <!-- NEW DESCRIPTION -->
  34. <div class='form-group'>
  35. <label class='control-label col-sm-2'>Description:</label>
  36. <div class='col-sm-10'>
  37. <textarea class='form-control' name='newDescription' rows='3' style='resize:vertical;'><?php echo $row[2]; ?></textarea>
  38. </div>
  39. </div>
  40. <!-- NEW TYPE -->
  41. <div class='form-group'>
  42. <label class='control-label col-sm-2'>Type:</label>
  43. <div class='col-sm-10'>
  44. <input type='text' class='form-control' name='newType' value='<?php echo $row[3]; ?>'>
  45. </div>
  46. </div>
  47. <!-- NEW DURATION -->
  48. <div class='form-group'>
  49. <label class='control-label col-sm-2'>Duration:</label>
  50. <div class='col-sm-10'>
  51. <input type='text' class='form-control' name='newDuration' value='<?php echo $row[4]; ?>'>
  52. </div>
  53. </div>
  54. <!-- NEW START DATE -->
  55. <div class='form-group'>
  56. <label class='control-label col-sm-2'>Start Date:</label>
  57. <div class='col-sm-10'>
  58. <input type='text' class='form-control' name='newStart' value='<?php echo $row[5]; ?>'>
  59. </div>
  60. </div>
  61. <!-- NEW END DATE -->
  62. <div class='form-group'>
  63. <label class='control-label col-sm-2'>End Date:</label>
  64. <div class='col-sm-10'>
  65. <input type='text' class='form-control' name='newEnd' value='<?php echo $row[6]; ?>'>
  66. </div>
  67. </div>
  68. <!-- SUBMIT -->
  69. <div class='form-group text-center'>
  70. <div class='col-sm-offset-2 col-sm-10'>
  71. <button type='submit' class='btn btn-success' name='updateExperience' style='width:200px;'>Update Experience</button>
  72. </div>
  73. </div>
  74. </form>
  75. </div>
  76. <!-- END OF editExperience.php -->
  77. <?php
  78. include_once 'footer.html';
  79. ?>