Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <title>movies library home page</title>
  5.  
  6. </head>
  7. <body>
  8. <h1>movies</h1>
  9. <?php
  10.  
  11. $con=mysql_connect("mysql.ict.valley.outwood.com","oavcs62","zimf-stZ");
  12. $db_found = mysql_select_db("oavcs62");
  13. $result = mysql_query("Select movieID, Genre, Title, Description, RentalPrice FROM movies");
  14.  
  15. echo "<table>
  16. <tr>
  17. <th>Movie ID</th>
  18. <th>Genre</th>
  19. <th>Movie Name</th>
  20. <th>Movie Description</th>
  21. <th>Rental Cost Per Day</th>
  22. </tr>";
  23.  
  24. while($row = mysql_fetch_array($result))
  25. {
  26. echo "<tr>";
  27. echo "<td>" . $row['MovieID'] . "</td>";
  28. echo "<td>" . $row['Genre'] . "</td>";
  29. echo "<td>" . $row['Title'] . "</td>";
  30. echo "<td>" . $row['Description'] . "</td>";
  31. echo "<td>" . $row['RentalPrice'] . "</td>";
  32.  
  33. echo "</tr>";
  34. }
  35.  
  36. echo"</table>";
  37. mysql_close($con);
  38.  
  39. ?>
  40. <br /><br />
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement