-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-package-process.php
41 lines (27 loc) · 1.04 KB
/
update-package-process.php
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
35
36
37
38
39
40
<?php
session_start();
error_reporting(0);
include('includes/config.php');
include('./Classes/DestinationUpdateManager.php');
if (strlen($_SESSION['alogin']) == 0) {
header('location:index.php');
} else {
$pid = intval($_GET['pid']);
$destinationUpdateManager = new DestinationUpdateManager($dbh);
if (isset($_POST['submit'])) {
$pname = $_POST['destination_name'];
$ptype = $_POST['destination_category'];
$plocation = $_POST['destination_location'];
$sdescription = $_POST['small_description'];
$pdetails = $_POST['destinationdetails'];
$pimage = $_FILES["packageimage"]["name"];
$result = $destinationUpdateManager->updateDestinationDetails($pid, $pname, $ptype, $plocation, $sdescription, $pdetails);
if ($result) {
$msg = "Package Updated Successfully";
} else {
$error = "Error updating package";
}
}
$destinationDetails = $destinationUpdateManager->getDestinationDetails($pid);
}
?>