-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmovies.php
More file actions
28 lines (23 loc) · 823 Bytes
/
Copy pathmovies.php
File metadata and controls
28 lines (23 loc) · 823 Bytes
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
<?php
include 'admin/db_connect.php';
$movies = $conn->query("SELECT * FROM movies where '".date('Y-m-d')."' BETWEEN date(date_showing) and date(end_date) order by rand()");
?>
<header class="masthead">
<div class="container-fluid">
<div id="movies">
<?php while($row=$movies->fetch_assoc()): ?>
<div class="movie-item">
<img class="" src="assets/img/<?php echo $row['cover_img'] ?>" alt="<?php echo $row['title'] ?>" >
<div class="mov-det">
<button type="button" class="btn btn-primary" data-id="<?php echo $row['id'] ?>">Reserve Seat</button>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</header>
<script>
$('.mov-det button').click(function(){
location.replace('index.php?page=reserve&id='+$(this).attr('data-id'))
})
</script>