...

View Full Version : Pull Down submit



DaKKie
02-26-2008, 08:00 PM
I need a little help here. I want to start a search and I want to start out with state and zip code. So I have a pull down with every state and D.C. and then I have a text area for the user to type in their zip code in that certain state.

I'm wondering what the easiest and most effective way to do this is. I was thinking of making a table that has 51 rows the the states and D.C. Then I'm thinking that's bogus. All I need to do it when the person chooses the states in the pulldown it posts that into the database and when they type there zip code and press submit it narrows down the search to jut their town/city or says wrong zip code or something.

Could someone help me? Please?

croatiankid
02-26-2008, 08:14 PM
If you're asking how to make a dropdown list, like this:
<select>
<option>state1</option>
<option>state2</option>
</select>

DaKKie
02-26-2008, 08:28 PM
No I'm not. I know that part.

It's hard to ask in words. Uhh....



<table width="360" height="137" border="0">
<tr>
<td height="29"><label></label>
<form id="state" name="state" method="post" action="">
<label><span class="style3">State</span>
<select name="State" id="State" tabindex="1">
<option selected="selected">Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>California</option>
<option>Colorado</option>
<option>Connecticut</option>
<option>Delaware</option>
<option>Florida</option>
<option>Georgia</option>
<option>Hawaii</option>
<option>Idaho</option>
<option>Illinois</option>
<option>Indiana</option>
<option>Iowa</option>
<option>Kansas</option>
<option>Kentucky</option>
<option>Louisiana</option>
<option>Maine</option>
<option>Maryland</option>
<option>Massachusetts</option>
<option>Michigan</option>
<option>Minnesota</option>
<option>Mississippi</option>
<option>Missouri</option>
<option>Montana</option>
<option>Nebraska</option>
<option>Nevada</option>
<option>New Hampshire</option>
<option>New Jersey</option>
<option>New Mexico</option>
<option>New York</option>
<option>North Carolina</option>
<option>North Dakota</option>
<option>Ohio</option>
<option>Oklahoma</option>
<option>Oregon</option>
<option>Pennsylvania</option>
<option>Rhode Island</option>
<option>South Carolina</option>
<option>South Dakota</option>
<option>Tennessee</option>
<option>Texas</option>
<option>Utah</option>
<option>Vermont</option>
<option>Virginia</option>
<option>Washington</option>
<option>Washington D.C.</option>
<option>West Virginia</option>
<option>Wisconsin</option>
<option>Wyoming</option>
</select>
</label>
</form>
</td>
</tr>
<tr>
<td height="29"><form id="zip" name="zip" method="post" action="">
<label><span class="style3">Zip Code</span>
<input name="zip" type="text" id="zip" tabindex="2" size="10" maxlength="5" />
</label>
</form> <label></label></td>
</tr>
<tr>
<td height="26"><form id="submit" name="submit" method="post" action="">
<label>
<input type="submit" name="submit" id="submit" value="Submit" tabindex="3" />
</label>
</form>
<label></label></td>
</tr>
</table>
Now from there with the pull down text area and button. I the user to be able to choose a state and then type in their zip code and show a certain page.

meth
02-26-2008, 09:18 PM
OK, you have the form. It looks fine. However you have not stated (i)what query you are going to search with and (ii)how state and zip are intended to filter results. It would also be handy to see the relevant database table structures.

DaKKie
02-26-2008, 09:25 PM
Ok well what I'm trying to figure out is the best way, starting with the form.

What I want to search is certain cars in the cities/towns from the state. So say I'm looking for a Acura RSX 2005, and I live in NY and my zip is whatever one of their zip codes are. I pull down to New York and type my cities zip in. and it finds all the Acura RSX in that city, and I'll go on later to maybe add miles away from that zip and so on. So I just need to know the best way to do it.

meth
02-27-2008, 12:15 AM
So, you haven't designed a database yet?

DaKKie
02-28-2008, 04:36 PM
No, I haven't done anything except what you see above. because I'm trying to figure out the best way of doing this.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum