Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <head>
- <link rel="stylesheet" type="text/css" href="Search.css">
- <img src="logo.jpg" alt="Logo" id="logoImg" height="100px" width:"600px">
- <div id="InputA">
- <h1 id="h">Data Of Shop One</h1>
- </div>
- <?php
- $dbhost = 'localhost';
- $dbuser = 'root';
- $dbpass = '';
- $conn = mysqli_connect($dbhost, $dbuser, $dbpass);
- if(isset($_GET["data"]))
- {
- $data = $_GET["data"];
- $f=$data;
- }
- if(! $conn )
- {
- die('Could not connect: ' . mysqli_error());
- }
- $sql = "SELECT O_no, piece_name,piece_code,piece_price,piece_qty,total,comments,shipped
- FROM parts Where O_no='$data'";
- mysqli_select_db($conn,'shop1');
- $retval = mysqli_query($conn,$sql );
- if(! $retval )
- {
- die('Could not get data: ' . mysql_error());
- }
- echo"
- <div class='CSSTableGenerator' >
- <table>
- <tr>
- <th>Order Number</a></th>
- <th>Piece Name</th>
- <th>Piece Code</th>
- <th>Piece Price</th>
- <th>Quantity</th>
- <th>Total</th>
- <th>Comments</th>
- <th> Shipped</th>
- </tr>
- ";
- while($row = mysqli_fetch_array($retval, MYSQL_ASSOC))
- {
- echo "<h2 style='text-align:left;float:left;'>Order nuber:". $row['O_no']."</h2>";
- echo "<h2 style='text-align:left;float:right;'>piece_name:". $row['piece_name']."</h2>";
- echo "<tr>";
- echo "<td><a href='Search.php?data=$row[O_no]' >".$row['O_no']."</a></td>";
- echo "<td>". $row['piece_name']."</a></td>";
- echo "<td>". $row['piece_code']."</td>";
- echo "<td>". $row['piece_price']."</td>";
- echo "<td>". $row['piece_qty']."</td>";
- echo "<td>". $row['total']."</td>";
- echo "<td>". $row['comments']."</td>";
- echo "<td><input type='checkbox' name='yes' value='Yes' checked/> ". $row['shipped']."</td>";
- echo "</tr>";
- }
- echo "</table>";
- echo"</div>";
- mysqli_close($conn);
- ?>
- <input type=button onClick="parent.location='addpart.php?data='.<?php echo $data ?>" value="Add Part" id="btnOne">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement