Unstoppable Domains

Merging forms

Spaceship Spaceship
Watch

teclance

Established Member
Impact
1
Hi guys,

I got a music site and right now it has two seperate search forms. 1 for searching for music titles and the other search for videos.

I would like to merge these so that the user has to input there text than from a drop down select the artist or video.

Can anyone help with this?

Here are the codes:

video search:
Code:
<form action="search.php" method="post">
					<div class="spacer"><b>Video Title:</b></div>
					<div class="spacer"><input type="text" name="title" class="bginput" /></div>
					<div class="spacer"><input type="submit" value="Find Videos" class="button" /></div>
					<input type="hidden" name="do" value="title" />
				</form>



Artist search
Code:
<form action="search.php" method="post">
					
                <div class="spacer"><b>Video Artist:</b></div>
					<div class="spacer"><input type="text" name="creator" class="bginput" /></div>
					<div class="spacer"><input type="submit" value="Find Artist" class="button" /></div>
					<input type="hidden" name="do" value="creator" />
				</form>
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
well, i can see your using php, so pretty much, just make a text field, a dropdown field and a submit buttton. then on the page you submit the search to, use something like this. say your dropdown variable is called "searchtype", and your text was called "text"
Code:
<?
if $searchtype='video' {
search video database for "text"
} elseif $searchtype='creator' {
search Creator Database for "text"
}
hope that helps
 
0
•••
thanks I'll give it a shot.
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back