-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateTripInfo.php
More file actions
34 lines (26 loc) · 856 Bytes
/
Copy pathupdateTripInfo.php
File metadata and controls
34 lines (26 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php session_start(); ?>
<?php
//session_start();
require_once 'config.php';
$locationid = $_SESSION["locationid"];
//$id = $_SESSION['id']
$lodging = $_REQUEST['lodging'];
if($lodging!=''){
$sql = "UPDATE Location_lodging
SET lodging = '".$lodging."'
WHERE location_ID = '".$locationid."'";
if(mysqli_query($link, $sql)){
echo '<script>alert("Success, updating lodging")</script>';
}
else{
echo '<script>alert("Error, could not update lodging")</script>';
}
}
else{
echo '<script>alert("Error, you must enter into the field to update")</script>';
}
$usrid = $_SESSION['usrid'];
$url = "ViewTrips.php?usrid=".$usrid;
echo '<script>location.href="'.$url.'"</script>';
// echo "<script>location.href='ViewTrips.php'</script>";
?>