-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateDetails.php
More file actions
33 lines (24 loc) · 1.05 KB
/
updateDetails.php
File metadata and controls
33 lines (24 loc) · 1.05 KB
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
<?php
session_start();
include_once('connection.php');
if (isset($_GET['approve']) && isset($_GET["cname"])){
$id = $_GET['approve'];
$sql = "UPDATE reservation SET STATUS = 'APPROVED' WHERE ID = '$id'";
mysqli_query($conn,$sql);
$cname = $_GET["cname"];
$sql = "SELECT * from registration WHERE FULLNAME = '$cname'";
$result = mysqli_query($conn,$sql);
$row = mysqli_fetch_array($result);
$num = $row["PCONTACT"];
$n = $row["FULLNAME"];
$content = 'Greetings again '.$n.'!
Your chosen package has been confirmed. Please wait for our call on where and when it is convenient for a business meetup. Thank you for choosing Occasions made easy! See you!';
include "smsGateway.php";
$smsGateway = new SmsGateway('jgui1129.jg@gmail.com', '123456');
$deviceID = 47781;
$numbers = $num;
$message = $content;
$result = $smsGateway->sendMessageToNumber($numbers, $content, $deviceID);
header("location: list-of-reservations.php");
}
?>