-
Notifications
You must be signed in to change notification settings - Fork 8
/
editLocation.php
23 lines (17 loc) · 761 Bytes
/
editLocation.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once 'classes/Location.php';
require_once 'classes/LocationTableGateway.php';
require_once 'classes/Connection.php';
$id = $_POST['id'];
$locationName = $_POST['Name'];
$locationAddress = $_POST['Address'];
$managerFName = $_POST['ManagerFName'];
$managerLName = $_POST['ManagerLName'];
$managerEmail = $_POST['ManagerEmail'];
$managerNumber = $_POST['ManagerNumber'];
$locationMaxCap = $_POST['MaxCapacity'];
$location = new Location($id, $locationName, $locationAddress, $managerFName, $managerLName, $managerEmail, $managerNumber, $locationMaxCap);
$connection = Connection::getInstance();
$gateway = new LocationTableGateway($connection);
$id = $gateway->update($location);
header('Location: viewLocations.php');