i am writing a script that will search for and display results based on multiple input criteria, currently only two. One search criteria will be which table in the database and the second criteria is a comparison of a dollar amount in a particular column.
i want to first select the table to pull from, which there are three choices; Collin,Dallas,Tarrant. I have written so far using radio button
<input type="radio" id="mychoice" name="Collincountychoice" value="collincounty" >Collin County<br>
<input type="radio" id="mychoice" name="Dallacountychoice" value="dallascounty">Dallas County<br>
<input type="radio" id="mychoice" name="Tarrantcountychoice" value="tarrantcounty">Tarrant County<br>
i can submit this using the get method and it displays the desired result of the total number of rows in the table.
www.example.com/search.php?data_table=collincounty
I want to then sort by a dollar amount to narrow the number of columns returned using a text box to submit that value.
<input type="text" name="dollar" id="dollar" value="" />
When i submit this value with the button in the form it removes the "data_table" from the url and passing this;
www.example.com/search.php?dollar=500
i need to build on the previous results and pass something like;
www.example.com/search.php?data_table=collincounty&dollar=500
im sure its something simple that im missing, thanks in advance.
UPDATE
<form id="form1" name="form1" method="get" action="">
<label>
<input type="radio" id="Collinchoice" name="data_table"
value="collincounty" >Collin County<br>
<input type="radio" id="Dallaschoice" name="data_table"
value="dallascounty" >Dallas County<br>
<input type="radio" id="Tarrantchoice" name="data_table"
value="tarrantcounty">Tarrant County<br>
<label>Dollar Amount:</label>
<input type="text" name="dollar" id="dollar" value="<?php echo
stripcslashes($_REQUEST["dollar"]); ?>" />
<input type="submit" name="button" id="button" value="Filter" />
</form>