Guest User

Untitled

a guest
Sep 15th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. The Connection is Successful but nogetting the data into website mysql
  2. The Connection is Successful but nogetting the data into website
  3.  
  4. enter code here`Please let me know who to correct it<html>
  5. <head>
  6. <title> Welcome to PDM</title>
  7. </head>
  8. <body>
  9. <div>
  10. <centre>
  11. Good For Checking The Prices
  12. </centre>
  13. <?php>`
  14.  
  15.  
  16. $db_host = "localhost";
  17. $db_username = "wikiacwj_price";
  18. $db_pass = "";
  19. $db_name = "wikiacwj_price";
  20.  
  21. mysql_connect("$db_host","$db_username","$db_pass") or die ("Please Try Again");
  22. mysql_select_db("wikiacwj_price") or die ("no data");
  23.  
  24. $sql = mysql_query("SELECT * FROM price_comparsion where product_name='ok'");
  25.  
  26. //write the results
  27.  
  28. while ($row = mysql_fetch_array($sql)); {
  29. echo $row['product_name'];}
  30.  
  31. ?>
  32. </body>
  33. </html>
  34.  
  35. ...
  36. while ($row = mysql_fetch_array($sql)) {
  37. echo $row['product_name'];
  38. }
  39. ...
Add Comment
Please, Sign In to add comment