<?php
error_reporting(E_ALL);
ini_set(“display_errors”, 0);
$p= mysql_connect(‘localhost’,’root’,”);
$q=mysql_select_db(‘arratentblog’,$p);

?>

<div id=”news_box”>
<form id=”search_box” method=”post” action=”search.php” onSubmit=”return newsValidations();”>
<input type=”text” id=”mail” name=”search” value=”search box”  />
<input type=”image” src=”images/go-botton.jpg” width=”27″ height=”24″ id=”go” alt=”Go” title=”Go” />
</form>
</div>
<?php
// requesting the value from other page
//$search=$_REQUEST[‘search’];
//$query=mysql_query(“select * from wp_posts where post_title like(‘%$search%’)”);

$query=mysql_query(“SELECT * FROM wp_posts WHERE  post_content like ‘%$search%’ or post_title like ‘%$search%’ ORDER BY post_title”);
while ( $r = mysql_fetch_array($query))
{

echo $r[‘post_title’];
echo $r[‘post_content’];

}
?>