forked from ITArif/Online-Movie-Ticket-Booking-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
movie_timelist.php
73 lines (57 loc) · 2.17 KB
/
movie_timelist.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
include_once "connection/conn.php";
$path=realpath(dirname(__FILE__));
?>
<?php include_once "file/header.php"; ?>
<section class="contentsection clear">
<?php include_once "file/sidebar.php"; ?>
<article class="maincontent clear">
<div class="content">
<div class="catagoryoption">
<h2>Movie Time List</h2>
<?php
if (isset($_GET["movie_time_id"])) {
$movie_time_id=$_GET["movie_time_id"];
$sql="DELETE from movie_time where movie_time_id='$movie_time_id'";
$query=mysqli_query($connection,$sql);
if ($query !=false) {
echo "<span class='success'>Delete successfully<span>";
}
}
?>
<table class="mytable">
<tr>
<th width="15%">Serial No.</th>
<th width="20%">Movie Id</th>
<th width="20%">Movie Name</th>
<th width="20%">Movie_Time Id</th>
<th width="50%">Action</th>
</tr>
<?php
$sql="SELECT * FROM movie_time";
$query=mysqli_query($connection,$sql);
if ($query !=false) {
$i=1;
while ($value=mysqli_fetch_array($query)) {
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $value["movie_id"] ?></td>
<td><?php echo $value["timemovie"] ?></td>
<td><?php echo $value["movie_time_id"] ?></td>
<td>
<a href="editmovie_time.php?movie_time_id=<?php echo $value['movie_time_id'] ?>">Edit</a> ||
<a href="?movie_time_id=<?php echo $value['movie_time_id'] ?>" onclick="return confirm('Do you wnat to delete this ?')">Delete</a>
</td>
</tr>
<?php }} ?>
</table>
</div>
</div>
</article>
</section>
<?php include_once "file/footer.php"; ?>
</div>
</body>
</html>