1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <!--
-
- Developer: Coralys Cubero Rivera
- Fall 2018
-
- This file is meant to be for editing the information stored on a selected experience. At the
- end of the editing, the information will be sent to another script to be updated.
-
-
-
- Updated by: Víctor A. Hernández
- Summer 2019
-
- -->
-
- <?php
- require_once 'processes/config.php';
- require_once 'processes/dbh.inc.php';
- include_once 'header.php';
-
- if (isset($_GET['edit'])) {
- $query = "SELECT * FROM `experience` WHERE `id`=".$_GET['edit'].";";
- $result = mysqli_query($connection, $query);
- if(!$result) die("Error: ".mysqli_error($connection));
- $row = mysqli_fetch_array($result);
- }
- ?>
-
- <!-- START OF editExperience.php -->
- <div class='container'>
- <h2>Experience <?php echo $row[0]; ?></h2>
- <form class='form-horizontal' action='updateExperience.php' method='POST'>
-
- <!-- ID -->
- <input type='hidden' name='id' value='<?php echo $row[0]; ?>'>
-
- <!-- NEW TITLE -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>Title:</label>
- <div class='col-sm-10'>
- <input type='text' class='form-control' name='newTitle' value='<?php echo $row[1]; ?>'>
- </div>
- </div>
-
- <!-- NEW DESCRIPTION -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>Description:</label>
- <div class='col-sm-10'>
- <textarea class='form-control' name='newDescription' rows='3' style='resize:vertical;'><?php echo $row[2]; ?></textarea>
- </div>
- </div>
-
- <!-- NEW TYPE -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>Type:</label>
- <div class='col-sm-10'>
- <input type='text' class='form-control' name='newType' value='<?php echo $row[3]; ?>'>
- </div>
- </div>
-
- <!-- NEW DURATION -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>Duration:</label>
- <div class='col-sm-10'>
- <input type='text' class='form-control' name='newDuration' value='<?php echo $row[4]; ?>'>
- </div>
- </div>
-
- <!-- NEW START DATE -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>Start Date:</label>
- <div class='col-sm-10'>
- <input type='text' class='form-control' name='newStart' value='<?php echo $row[5]; ?>'>
- </div>
- </div>
-
- <!-- NEW END DATE -->
- <div class='form-group'>
- <label class='control-label col-sm-2'>End Date:</label>
- <div class='col-sm-10'>
- <input type='text' class='form-control' name='newEnd' value='<?php echo $row[6]; ?>'>
- </div>
- </div>
-
- <!-- SUBMIT -->
- <div class='form-group text-center'>
- <div class='col-sm-offset-2 col-sm-10'>
- <button type='submit' class='btn btn-success' name='updateExperience' style='width:200px;'>Update Experience</button>
- </div>
- </div>
-
- </form>
- </div>
- <!-- END OF editExperience.php -->
-
- <?php
- include_once 'footer.html';
- ?>
|