Guest User

Untitled

a guest
Apr 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php
  2. include("includes/db.php");
  3. $string = mysql_real_escape_string(urldecode($_GET['q']));
  4.  
  5. if(strlen($string)< 4)
  6. {
  7. echo "Please Enter More Of a Phase Or Catch Phase";
  8. }
  9. else
  10. {
  11. echo "SELECT * FROM engine WHERE `keyword` LIKE '%$string%'<br />";
  12.  
  13. $query = mysql_query("SELECT * FROM engine WHERE `keyword` LIKE '%$string%'") or die (mysql_error());
  14.  
  15. echo mysql_num_rows ( $query );
  16.  
  17. while($row = mysql_fetch_assoc($query))
  18. {
  19. $name = $row['name'];
  20. $deciption = $row['deciption'];
  21. $website_url = $row['website_url'];
  22. $link = $row['random_link'];
  23. echo "<div align='left'>";
  24. echo "$name<br />";
  25. echo "$deciption<br />";
  26. echo "<a herf='$link'>$website_url</a>";
  27. echo "<p />";
  28. }
  29. }
  30. ?>
Add Comment
Please, Sign In to add comment