View Single Post
05-01-2006, 05:38 PM
#7
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

try this (I trust you know enough to edit this to exactly what you want)

search.html:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="24%" height="60" border="1">
  <tr>
    <td bgcolor="#d5d8df"><font color="3a357c"><U>Search this site or google</U></font><BR>
	  <form name="search" method="get" action="redirect.php">
      <input name="word" type="text"><br>
	  
	  <input name="location" type="radio" value="0" checked>this site
	 
	  <input name="location" type="radio" value="1"> google
	  <input type = "submit" value = "search">
	  </form></td>
  </tr>
</table>

</body>
</html>
------------------

redirect.php
Code:
<?php

$word = $_GET["word"];
$site = $_GET["location"];

if($site == 0)
{
	$term = "&as_sitesearch=yoursite.com";
}

else
{
	$term = NULL;
}

echo "<META HTTP-EQUIV=\"Refresh\"
CONTENT=\"0; URL=http://www.google.com/search?as_q=$word$term\">";
?>