Hello,
I've read on how to insert properly into two linked tables using mysql_insert_id() function from:
http://www.webproworld.com/web-programming-discussion-forum/87197-php-insert-different-records-into-multiple-mysql-tables-same-unique-id.html
now how about if i want it to be from 4 linked tables? can I still use the function? and I want some to be a dropdown lists.
My tables are:
Client(clientID, Name, Address, ContactNo, countryID*, supportID*)
Environment(environmentID, environmenttypeID, Hostname, ClientID)
Environenttype(environmenttypeID, Type)
System(systemID, Label, environmentID)
Note:
-*ignore these fields for this thread
-all IDs are auto_inc int except for environment type
-There are only 3 fixed environment types:
--------id--------|-------type------
--------P--------|----Production--
--------T--------|--------Test------
--------D--------|--------DR--------
And I want my form to be in one page like:
------Client------
Select clients' name: [drop-down box here|v|]
(other fields like address and contact will be echoed here based on the name selected)
------Environment------
Type: [show environmenttype.type where environmenttype.id=environment.id(drop-down box)|v|]
Hostname: [enter text]
------System------
Label: [enter text]
[Back] [Submit]
and after the user submits, they will be redirected to another page where they'll insert more data to other tables inside the db based on the id of the system submitted here. but i guess that's a different thing altogether.
Please help me in giving some light as to how to make this input form. Thank you so much!