Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- error_reporting(0);
- include_once('config.php');
- $ptitle=$title.' :: Search Results';
- include_once('header.php');
- ?>
- <div id="rightcolumn">
- <p> <?php echo $side_adcode; ?></p>
- </div>
- <div id="main">
- <h2>Search results</h2>
- <?
- $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)");
- if(mysql_num_rows($r))
- while($row=mysql_fetch_array($r))
- {
- //show search results
- 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/>';
- }
- else
- echo 'No quotes found.';
- ?>
- </div>
- <!-- content-wrap ends-->
- </div>
- <!-- footer starts -->
- <?
- $ptitle=$title.' :: Page Name';
- include_once('footer.php');
- ?>
Add Comment
Please, Sign In to add comment