Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head><title>Viewing All Games</title><link href="style.css" rel="stylesheet" type="text/css" /></head><body>
- <?php
- print "<center><a href='Reading01.php'><View All Games></a> // <a href='Adding01.php'><Add Games></a> // <a href='Deleting01.php'><Remove Games></a></center><br>";
- if (!$_POST[record]) {
- showform();
- }
- function showform() {
- $host="grapir.exaltedlegion.com";
- $user="bloodstar";
- $password="<pass>";
- $db=mysql_connect($host, $user, $password) or die(mysql_error());
- mysql_select_db("ahhhhhhhgames",$db);
- $sql="SELECT id, title, console FROM games ORDER BY title, console ASC";
- $result=mysql_query($sql, $db) or die(mysql_error());
- print <<<HERE
- <h2>Select a game to modify:</h2>
- <form method='post' action='modify02.php'>
- <select name='record'>
- <option value=''>Please select a game.</option>
- HERE;
- while ($row=mysql_fetch_array($result)){
- $title=$row["title"];
- $console=$row["console"];
- $id=$row["id"];
- print "<option value='$id'>$id - $console - $title</option>";
- }
- print "<p><br><input type='submit' name='modify' value='modify'></p><input type='hidden' name='id' value='$id'></form>";
- }
- ?>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement