Tuesday, November 07, 2006

How to make our own PHP text box link to Google?

<?php
if($_POST){
$searchtext = $_POST['search'];
echo '<p align="center"> <meta http-equiv="Refresh" content="1;URL=http://www.google.ca/search?hl=en&q=';
echo $searchtext;
echo '&btnG=Google+Search&meta=">';
echo '<b>CONNECTING TO GOOGLE...</b>';
}
else
{
echo '<form name="form1" method="post" action="googlesearch.php">
<input type="text" name="search">
<input type="submit" name="Submit" value="Search">
</form>';
}
?>

No comments: