View Full Version : HTML Forms Questions
Neehosoft
11-18-2009, 12:31 AM
Hi, I have a google search here (http://www.neehosoft.com/base.html) and i want to add underneath it radio buttons and depending on which one it will take you to a different place (i.e. google, tpb ect).
So, how would i do this? If there is a search button, what would i do to now what to put in der?
Also, how would i index multiple sites?
Like, torrentz.com does.
You dont have to tell me in a super big post but links to a tut?
Thanks
Donnie(NeehoSoft)
Daniel
11-18-2009, 04:08 AM
<form>
<input type="radio" name="tehgoogle" value="1" /> The Web
<input type="radio" name="tehgoogle" value="2" /> Only NeehoSoft.com
<br />
</form>
Do you mean something like that?
Neehosoft
11-19-2009, 01:01 AM
<form>
<input type="radio" name="tehgoogle" value="1" /> The Web
<input type="radio" name="tehgoogle" value="2" /> Only NeehoSoft.com
<br />
</form>
Do you mean something like that?
Yes, i know how to do that, but how do i make it so the search's action URL changes to which radio is clicked?
CowFish
11-19-2009, 01:15 AM
<form action="search.php" method="POST">
<input type="radio" name="tehgoogle" value="1" /> The Web
<input type="radio" name="tehgoogle" value="2" /> Only NeehoSoft.com
<input type="submit" name="submit" value="submit">
<br />
</form>
Search.php
<?php
$googlez = $_POST['tehgoogle'];
//example
function search($params, $site) {
//second variable is more important here
//actual function here including a filter for only the specified site
}
search($input, $googlez);
?>
Maybe...
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.