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:
|
<html>
<body>
<?php
$db = mysqli_connect("localhost","root","","gncorpus");
mysqli_set_charset($db, 'utf8');
$sql = "SELECT Title, Mentions, PrimPub, OriginalLanguage, FirstName, LastName, FirstName, LastName FROM book,
relbookauthor, author where book.ID = relbookauthor.BookID
and author.ID = relbookauthor.AuthorID";
$sql2 = "SELECT FirstName, LastName FROM book, relbookillustrator, author
where book.ID = relbookillustrator.BookID
and author.ID = relbookillustrator.AuthorID";
$query = mysqli_query($db,$sql);
$query2 = mysqli_query($db,$sql2);
$list_Title = array();
$list_Mentions = array();
$list_PrimPub = array();
$FirstName_Author = array();
$LastName_Author = array();
$FirstName_Illustrator = array();
$LastName_Illustrator = array();
<?php while($row = mysqli_fetch_array($query) and $row2 = mysqli_fetch_array($query2)) { ?>
<?php $list_Title[] = $row['Title']; ?>
<?php $list_Mentions[] = $row['Mentions']; ?>
<?php $list_PrimPub[] = $row['PrimPub']; ?>
<?php $FirstName_Author[] = $row['FirstName']; $LastName_Author[] = $row['LastName']; ?>
<?php $FirstName_Illustrator[] = $row2['FirstName']; $LastName_Illustrator[] = $row2['LastName']; ?>
<?php } ?>
<?php $array_length = count($list_Title); mysqli_close($db); ?>
<h1 align="center">Book</h1>
<form name="Enter" action="check2.php" method="post">
<table align="center" border="0">
<tr>
<td>Title</td>
<td><input type='text' name="title" value='{$list_Title[0]}'/></td>
</tr>
<tr>
<td>Mentions</td>
<td><input type="text" name="mentions"</td>
</tr>
<tr>
<td>PrimPub</td>
<td><input type="text" name="primPub"</td>
</tr>
<tr>
<td>Author</td>
<td><input type="text" name="author"</td>
</tr>
<tr>
<td>Illustrator</td>
<td><input type="text" name="illustrator"</td>
</tr>
</table>
<table align="center" border="0">
<tr>
<td><input type="button" value="<<"></td>
<td><input type="button" value="<"></td>
<td><input type="button" value=">"></td>
<td><input type="button" value=">>"></td>
</tr>
<tr>
<td><input type="submit" value="show all"></td>
<td><input type="submit" value="search"></td>
<td><input type="reset" value="reset"></td>
</tr>
</table>
</form>
</body>
</html>
|