PHP Snippets

Name:Search Google
Description: This will search google with the specified keyword.

Code below...
> <!--- This is the HTML code! -->
<!--- 
Save the code below as googlesearch.php --> 

<
form method="post" action="googleresults.php">
<
input type="text" name="google" size="30"/> <input type="submit" name="google_submit" value="Search" style="cursor:pointer;"/></p>
</
form>

<!--- 
This is the PHP code! -->
<!--- 
Save the code below as googleresults.php --> 

<?
php
  $keyword 
$_POST['google'];
  
$keyword str_replace(' ''+'$keyword);
  if (
$_POST['google_submit']) {
  
header("Location: http://www.google.com/search?q=$keyword");
 }
  
 
//Thats it! =)

« Back to PHP Snippets

Home | Site Map | Privacy Policy | Advertising | Contact Us
Copyright © 2006-2014 r2xDesign.net - All Rights Reserved.
eXTReMe Tracker