New to the list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



also new to php and databases. 
Brief background to set the stage: 
I'm attempting to build a site.  I'm using
Dreamweaver, mySQL, and a RAD product called Impakt
(the same people who do PHAKT).  Impakt works on the
php4 - ADODB model.  Up to this point I haven't had to
understand the code all too much to make things work,
aka. inserts, deletions, updates, etc.

Now to why I write today.
I have an insert transaction form, about 10 fields. 
Two of those fields are for "city" and "state".  I
have two tables:

State Table:            |     City Table:
(innodb)                |     (innodb)
StateID (Primary Key)   |     CityID 
State                   |     StateID 
                              City

The city table has a foreign key on the StateID field
referencing StateID in the state table.

So far so good.

In my form, I want a pull down menu for the state and
a list / menu for the City.  (You can probably
anticipate the question)  When a selection is made
from the state list I want the city menu / list to
reflect the associated cities.

Now I already know that using pure PHP I would need to
have the state selection set up as a post vars and
pass it into another page.  Unfortunately it can't
work that way.

So, I dug around more and see for behaviour like this,
typically you would need to use javascript.  The
examples I've found are exactly what I want, only they
use preformatted values and not the database / tables
I wish to use.

That is pretty much my dilemma.  Just not sure how to
go about it to make it work.

Appreciate any help or suggestions!

Thank you,
Stuart

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux