Guest User

Untitled

a guest
Jul 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <?
  2. error_reporting(0);
  3. include_once('config.php');
  4. $ptitle=$title.' :: Search Results';
  5. include_once('header.php');
  6. ?>
  7.  
  8. <div id="rightcolumn">
  9. <p> <?php echo $side_adcode; ?></p>
  10. </div>
  11. <div id="main">
  12.  
  13. <h2>Search results</h2>
  14.  
  15. <?
  16. $r=mysql_query("SELECT *,MATCH(`quote`,`author`,`category`) AGAINST('".mysql_real_escape_string($_GET['q'])."' IN BOOLEAN MODE) FROM `quotes` WHERE MATCH(`quote`,`author`,`category`) AGAINST('".mysql_real_escape_string($_GET['q'])."' IN BOOLEAN MODE)");
  17. if(mysql_num_rows($r))
  18. while($row=mysql_fetch_array($r))
  19. {
  20. //show search results
  21. echo '<a href="/quote/'.$row['id'].'/">'.$row['quote'].'</a><p align="right">More quotes in <a href="/category/'.str_replace(' ','_',$row['category']).'">'.$row['category'].'</a>. More quotes by <a href="/author/'.str_replace(' ','_',$row['author']).'">'.$row['author'].'</a>.</p><hr><br/>';
  22. }
  23. else
  24. echo 'No quotes found.';
  25. ?>
  26.  
  27.  
  28. </div>
  29. <!-- content-wrap ends-->
  30. </div>
  31. <!-- footer starts -->
  32.  
  33.  
  34.  
  35.  
  36. <?
  37. $ptitle=$title.' :: Page Name';
  38. include_once('footer.php');
  39. ?>
Add Comment
Please, Sign In to add comment