ausghostdog

Untitled

May 15th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. <?php
  2.  
  3. require_once "../database/dbconn.php";
  4. $conn = connect();
  5. if ($conn)
  6.  
  7.  
  8. {
  9.  
  10. $query = "select * from tblproducts ";
  11.  
  12. $result = mysqli_query($conn, $query);
  13.  
  14. if (!$result)
  15. {
  16. die ("query can not be performed at this time try again later" . mysql_error($conn));
  17. }
  18. else
  19. {
  20. $rows = mysql_num_rows($result);
  21.  
  22. ?>
  23. <table width="500" border="1">
  24.  
  25. <?php
  26. while ($rows = mysqli_fetch_array($result))
  27. {
  28.  
  29.  
  30.  
  31.  
  32. ?>
  33. <form method="post" action="displayinfo.php">
  34. <table width="500">
  35.  
  36. <tr>
  37. <td>product name</td>
  38. <td><?php echo $rows['Product_name'];?></td>
  39. </tr>
  40. <input type="hidden" name="prodname" value="<?php echo $rows['Product_name'];?>"/>
  41. <tr>
  42. <td>Product descroption</td>
  43. <td><?php echo $rows['Product_descroption'];?></td>
  44. </tr>
  45. <tr>
  46. <td>Product size</td>
  47. <td><?php echo $rows['Product_size'];?></td>
  48. </tr>
  49. <tr>
  50. <td>Product price</td>
  51. <td><?php echo $rows['Product_price'];?></td>
  52. </tr>
  53.  
  54. <tr>
  55. <td>qty </td>
  56. <td><input type="text" name="quantity" /></td>
  57. </tr>
  58.  
  59. <tr>
  60. <td></td>
  61. <td><input type="submit" value="submit" /></td>
  62. </tr>
  63.  
  64. </table>
  65. </form>
  66.  
  67.  
  68.  
  69. <?php
  70.  
  71.  
  72. }
  73.  
  74. ?>
  75.  
  76. <?php
  77.  
  78. }
  79.  
  80. }
  81.  
  82. ?>
Advertisement
Add Comment
Please, Sign In to add comment