-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI3.php
58 lines (55 loc) · 1.62 KB
/
I3.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
<?php
$db_connection = mysql_connect("localhost", "cs143", "");
if (!db_connection) {
$errmsg=mysql_error($db_connection);
print "Connection failed <br>";
exit(1);
}
mysql_select_db("CS143", $db_connection);
echo <<<HTMLCODE
<html>
<title>Add Actor/Director</title>
<link rel="stylesheet" type="text/css" href="Project1C.css">
<div id="sidebar">
<ul>Add New Content:<br>
<li><a href="I1.php">Add Actor/Director</a></li>
<li><a href="I2.php">Add Movie Information</a></li>
<li><a href="I3.php">Add Comments</a></li>
<li><a href="I4.php">Add Movie/Actor Relation</a></li>
<li><a href="I5.php">Add Movie/Director Relation</a></li>
</ul>
<ul>Browsing Content:<br>
<li><a href="B1.php">Show Actor Information</a></li>
<li><a href="B2.php">Show Movie Information</a></li>
</ul>
<ul>Search Interface:<br>
<li><a href="S1.php">Search Actor/Movie</a></li>
</ul>
</div>
<div id="main">
Add new comment: <br/>
<form action="I3.php" method="GET">
Movie: <select name="mid">
<!-- PHP Needed to get movie names -->
</select>
<br/>
Your Name: <input type="text" name="yourname" maxlength="20"><br/>
Rating: <select name="rating">
<option value="5"> 5 - Excellent </option>
<option value="4"> 4 - Good </option>
<option value="3"> 3 - It's ok~ </option>
<option value="2"> 2 - Not worth </option>
<option value="1"> 1 - I hate it </option>
</select>
<br/>
Comments: <br/>
<textarea name="comment" cols="80" rows="10"></textarea>
<br/>
<input type="submit" value="Rate!"/>
</form>
<hr/>
</div>
</html>
HTMLCODE;
mysql_close($db_connection);
?>