naraku9333

Untitled

Apr 16th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.81 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns = "http://www.w3.org/1999/xhtml">
  3.     <head>
  4.         <title>Auto parts Ordering</title>     
  5.     </head>
  6.     <body bgcolor  = "#707272" text = "#000000" style = "font-family: Lucida Console">
  7.         <style>
  8.             form#f1 {
  9.                     margin-left: auto;
  10.                     margin-right: auto;
  11.                     width: 60%;
  12.                 }
  13.             p {
  14.                 text-align: center;
  15.             }
  16.             span{
  17.                     display: inline-block;
  18.                 }
  19.  
  20.             span input {
  21.                     display: block;
  22.                     position: relative;
  23.                     top: -3em;
  24.                     text-align: center;
  25.                 }
  26.                
  27.             span label {
  28.                     display: block;
  29.                     font-size:75%;
  30.                     padding-top: 1.5em;
  31.                     text-align: left;
  32.                 }
  33.         </style>
  34.         <hr style = "width:75%"/>
  35.         <center>
  36.             <img src = "search64.png"/>
  37.             <h1>Automotive Parts Ordering</h1>
  38.         </center>
  39.         <hr style = "width:75%"/>
  40.         <br/>
  41.         <?php
  42.             $conn = mysql_connect("blitz.cs.niu.edu", "student", "student");
  43.             $legacy = mysql_select_db("csci467", $conn);
  44.  
  45.             $sql = "select * from parts";
  46.             $res = mysql_query($sql);
  47.  
  48.             echo "<center><fieldset style = 'display: inline-block;'>";
  49.             echo "<legend>Part Catalog</legend>";
  50.             echo "<span><table style = 'margin: 1px auto; width: 100%; border: 1px; border-spacing: 15px; padding: 5px'>";
  51.             echo "<tr><th>Part #</th><th>Description</th><th>Price<th></tr>";
  52.             while($row = mysql_fetch_array($res))
  53.             {
  54.                 echo "<tr><td>",$row[0],"</td><td>",$row[1],"</td><td>",$row[2],"</td></tr>";
  55.             }
  56.             echo "</table></span></fieldset></center>"
  57.         ?>
  58.     </body>
  59.     <br/><br/>
  60.     <footer>
  61.         <hr style = "width:75%"/>
  62.         <center>
  63.             <small>Group 1: Sean Vogel - Matthew Rowe - Richard Catalano</small>
  64.         </center>
  65.     </footer>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment