Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. <?php
  2.  
  3. $host="localhost";
  4. $username="root";
  5. $password="";
  6. $db_name="ge";
  7.  
  8. $con=mysqli_connect("$host", "$username", "$password","$db_name")or die("Your Connection is in error");
  9.  
  10.  
  11.  
  12.  
  13. $sql="SELECT pname,catogery,email FROM quetation WHERE catogery = '$catogery'";
  14.  
  15. $results=mysqli_query($con,$sql);
  16.  
  17. $count=mysqli_num_rows($results);
  18. if($count == 0)
  19. {
  20. echo "<font color="#0000"><h1 align="center">No details found</h1></font>";
  21. }
  22. else
  23. {
  24. $resource=mysqli_query($con,$sql);
  25. echo "<font color="#000000">
  26. <h2 align="center"></h2>
  27.  
  28. <table align="center" border="1" width="50%">
  29. <tr>
  30. <td><b>ProdName</b></td>
  31. <td><b>Catogery</b></td>
  32. <td><b>Price</b></td>
  33.  
  34. </tr> ";
  35.  
  36. while($result=mysqli_fetch_array($resource))
  37. {
  38. echo "
  39.  
  40. <div class="row">
  41. <div class="input-field col s12">
  42. <tr>
  43. <td>".$result[0]."</td>
  44. <td>".$result[1]."</td>
  45. <td><form name="abc" methos="post" action="postprice.php">
  46.  
  47. <input type="submit" value="send"> </td>
  48. </form>
  49.  
  50.  
  51.  
  52.  
  53. </div>
  54.  
  55. </div>
  56.  
  57. </tr>";
  58. }echo "</table></font>";
  59. }
  60.  
  61.  
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement