-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.php
executable file
·35 lines (33 loc) · 917 Bytes
/
event.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
<?php
require 'connect.inc.php';
$event_id = '';
$event_title = '';
if( isset($_GET['id']) )
{
$event_id = mysqli_real_escape_string($connection, $_GET['id']);
$query = "SELECT * FROM `events` WHERE event_id = '$event_id'";
$query_run = mysqli_query($connection, $query);
if(!$query_run)
{
echo 'problem loading event details';
}
else
{
$result = mysqli_fetch_assoc($query_run);
$event_title = $result['name'];
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1><?php echo $event_title; ?></h1>
<button class="button_1" data-event-id="<?php echo $event_id; ?>" data-action = "add">Add to cart</button>
<div id="feedback"></div>
</body>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/handleCart.js"></script>
</html>