Advertisement
Guest User

Untitled

a guest
Mar 6th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <head>
  5. <link rel="stylesheet" type="text/css" href="Search.css">
  6.  
  7.  
  8.  
  9. <img src="logo.jpg" alt="Logo" id="logoImg" height="100px" width:"600px">
  10.  
  11. <div id="InputA">
  12. <h1 id="h">Data Of Shop One</h1>
  13.  
  14. </div>
  15. <?php
  16. $dbhost = 'localhost';
  17. $dbuser = 'root';
  18. $dbpass = '';
  19.  
  20. $conn = mysqli_connect($dbhost, $dbuser, $dbpass);
  21. if(isset($_GET["data"]))
  22. {
  23. $data = $_GET["data"];
  24. $f=$data;
  25. }
  26. if(! $conn )
  27. {
  28. die('Could not connect: ' . mysqli_error());
  29. }
  30. $sql = "SELECT O_no, piece_name,piece_code,piece_price,piece_qty,total,comments,shipped
  31. FROM parts Where O_no='$data'";
  32.  
  33. mysqli_select_db($conn,'shop1');
  34. $retval = mysqli_query($conn,$sql );
  35. if(! $retval )
  36. {
  37. die('Could not get data: ' . mysql_error());
  38. }
  39. echo"
  40. <div class='CSSTableGenerator' >
  41. <table>
  42. <tr>
  43. <th>Order Number</a></th>
  44. <th>Piece Name</th>
  45. <th>Piece Code</th>
  46. <th>Piece Price</th>
  47. <th>Quantity</th>
  48. <th>Total</th>
  49. <th>Comments</th>
  50. <th> Shipped</th>
  51.  
  52. </tr>
  53. ";
  54. while($row = mysqli_fetch_array($retval, MYSQL_ASSOC))
  55.  
  56. {
  57. echo "<h2 style='text-align:left;float:left;'>Order nuber:". $row['O_no']."</h2>";
  58. echo "<h2 style='text-align:left;float:right;'>piece_name:". $row['piece_name']."</h2>";
  59. echo "<tr>";
  60. echo "<td><a href='Search.php?data=$row[O_no]' >".$row['O_no']."</a></td>";
  61.  
  62. echo "<td>". $row['piece_name']."</a></td>";
  63. echo "<td>". $row['piece_code']."</td>";
  64. echo "<td>". $row['piece_price']."</td>";
  65. echo "<td>". $row['piece_qty']."</td>";
  66. echo "<td>". $row['total']."</td>";
  67. echo "<td>". $row['comments']."</td>";
  68. echo "<td><input type='checkbox' name='yes' value='Yes' checked/>&nbsp". $row['shipped']."</td>";
  69.  
  70. echo "</tr>";
  71. }
  72. echo "</table>";
  73. echo"</div>";
  74.  
  75. mysqli_close($conn);
  76. ?>
  77.  
  78. <input type=button onClick="parent.location='addpart.php?data='.<?php echo $data ?>" value="Add Part" id="btnOne">
  79.  
  80.  
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement