-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoreInfo.php
More file actions
85 lines (68 loc) · 1.86 KB
/
Copy pathmoreInfo.php
File metadata and controls
85 lines (68 loc) · 1.86 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
session_start();
if(!isset($_SESSION['username'])) {
header('Location: login.php');
}
?>
<?php
require 'databaseConnection.php';
if ( is_numeric($_GET['id']) ) {
$request = $_GET['id'];
}
function getMovie($request) {
global $conn;
$sql = "SELECT *
FROM movieDatabase
WHERE movieID = " . $request;
$stmt = $conn -> prepare($sql);
$stmt -> execute();
return $stmt -> fetchAll();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>MOVIES!</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="ourStyles.css">
</head>
<body>
<div id="header"></div>
<div id="nav">
<h3>Members Area</h3>
<a href="movieSearch.php">Home</a><br>
<a href="editDatabase.php">Add to Database</a><br>
<a href="deleteStuff.php">Delete from Database</a><br>
<a href="changePassword.php">Change Password</a><br>
<a href="logout.php">Logout</a>
</div>
<table id="inDepth">
<tr><td id="space" colspan="2"></td></tr>
<tr>
<td>Title:</td>
<td>
<?php
$results = getMovie($request);
foreach ($results as $resultDisplay) {
echo $resultDisplay['title'] . "</td></tr>";
echo "<tr><td>Director:</td>";
echo "<td>" . $resultDisplay['director'] . "</td></tr>";
echo "<tr><td>Featured Star:</td>";
echo "<td>" . $resultDisplay['star'] . "</td></tr>";
echo "<tr><td>Genre:</td>";
echo "<td>" . $resultDisplay['genre'] . "</td></tr>";
echo "<tr><td>Rating:</td>";
echo "<td>" . $resultDisplay['rating'] . "</td></tr>";
echo "<tr><td>Length:</td>";
echo "<td>" . $resultDisplay['length'] . " minutes</td></tr>";
echo "<tr><td>Year:</td>";
echo "<td>" . $resultDisplay['year'] . "</td></tr>";
}
?>
</td>
</tr>
<tr><td id="space" colspan="2"></td></tr>
</table>
</body>
</html>
<?php $conn = null; ?>