Here's a sample script i just thought up. this requires PHP on your server, and a browser that supports javascript though.
CODE
<FORM METHOD="POST" ACTION="search.php">
<INPUT TYPE="text" NAME="query" SIZE="30"><br>
<INPUT TYPE="radio" NAME="engine" VALUE="MT" checked>Journal Entries
<INPUT TYPE="radio" NAME="engine" VALUE="google">All of Site (using google)<br>
<INPUT TYPE="submit">
</FORM>
<?php
if (isset($query)) {
if($query != "") {
dosearch ($engine,$query);
}
else {
echo "stop mucking about, you nonce!";
}
}
function dosearch ($engine,$query) {
if ($engine == "MT") {
echo "<script>";
echo "window.location = 'http://www.dotfaf.com/cgi-bin/mt/mt-search.cgi?search=";
echo "$query';";
echo "</script>";
}
else {
echo "<script>";
echo "window.location = 'http://www.google.com/search?q=";
echo "$query';";
echo "</script>";
}
}
?>
test it hereNote that i only used javascript for the redirection because icouldnt use the Header (Location: URL) function in php. This is because i was submitting to the same page that the form was on.
If you're going to use this script in such a way that the form resides on another page, put the php code on the "search.php" page and the form on any pages you want your visitors to be able to search, then replace
CODE
echo "<script>";
echo "window.location = 'http://www.google.com/search?q=";
echo "$query';";
echo "</script>";
with
CODE
Header (Location: http://www.google.com/search?q=$query);
Do the same for the "search my journals" bit.
One snag with using javascript though is that when the user uses the back button after the search, they end up back on the search page... they'll have to quickly click "back" twice.
Also, you can modify the script to pop-up the external search while displaying the local search in the same window.
_ _ _
Girlie: No, you cant have more than one action statment. wherever it's implemented, i'm sure there's some behind the scenes work like i've done to pass variables around