/
rateEvent2.php
36 lines (28 loc) · 924 Bytes
/
rateEvent2.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
<?php
include 'connect.php';
session_start();
$DEBUG=$_SESSION['debug'];
$user=$_SESSION['user'];
include 'displayEvent2.php';
//can only rate past events
$equery="SELECT event_id FROM an_event WHERE start_time >= date('$start') AND start_time < date(now())";
displayQry($equery, $DEBUG);
$eresult = $sql->query($equery);
echo '<h2>Rate an event out of 5 stars</h2>
<form action="rateEvent3.php" method="post">
Event ID:
<select name = "event">';
while($row = $eresult->fetch_assoc()) {
echo "<option value=" . $row['event_id'] . ">" . $row['event_id'] . "</option>";
}
echo '</select><br>
Rating:
<select name = "rating">
<option value="1">1 star</option>
<option value="2">2 stars</option>
<option value="3">3 stars</option>
<option value="4">4 stars</option>
<option value="5">5 stars</option>
</select><br>
<input type="submit" value="Rate"></form><br><br>';
?>