Jump to content

Archived

This topic is now archived and is closed to further replies.

digitalrain

tearing my hair out here...please help

Recommended Posts

Hi there...

I have a database that I've created that contains showtime information for a
particular TV show. The database contains the table 'show' which contains the
following fields:

id
Country
State
City
Cable
Station
Channel
Time
Zone (timezone)

Here's what I want to do:

Have a form that displays a drop-down list of countries. If a country OTHER than
the US is selected, the user just clicks 'search' and gets a formatted list of
showtimes in that country like this:

Here are our current listings for [Country name]:

[cable network]  [time]  [zone]
[cable network]  [time]  [zone]
[cable network]  [time]  [zone]
etc...

If, however, the US is selected, a second drop-down list of US states appears.
The user would select his/her state and then click 'search' and gets a formatted
list of showtimes in that state like this:

Here are our current listings for [State name]:

[city]  [cable network]  [station]  [channel]  [time]  [zone]
[city]  [cable network]  [station]  [channel]  [time]  [zone]
[city]  [cable network]  [station]  [channel]  [time]  [zone]
etc...

Nothing I have tried is working. Any help would be MUCH appreciated.


Thanks,

Cynthia

Share this post


Link to post
Share on other sites
you cannot make another dropdown magically appear like that with php. you need javascript for that.

Share this post


Link to post
Share on other sites
That I know :) I can get the non-search functionality of the form
working. It's just the search that doesn't work.

<sigh>

Thanks,

Cynthia

Share this post


Link to post
Share on other sites
post some code.

your original post does sound like your trying to do something that will need to be done with javascript, however,
you mention "search" is this a sql problem?

post what you have that is not working

Share this post


Link to post
Share on other sites
why not just use a normal form and let the form be controlled via the users ip and let the form show the revelent country via there ip.

for example if the user like me was from the uk then the first country showing is uk.

Share this post


Link to post
Share on other sites
okay in your OP you seem to ask how to get a dropdown box to appear with states, if the user selects the USA as their country.  That's a js solution.  Unless you want them to choose the US in countries and then click a button, then you could have an if statement that checks for a GET or a POST variable to see if the countries dropdown matches USA. If yes, then echo out the states dropdown box. if no, then skip it. 

But your next post mentions having all that figured out, but something is wrong with the search? Please post your query string and what your expected results are.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.