Re: Designing an input form for one-to-many etc.

From: Date: Sun, 08 Oct 2000 12:10:41 +0000
Subject: Re: Designing an input form for one-to-many etc.
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-3410@lists.php.net to get a copy of this message
I visited the address you ask people to go. Do you want put all that data in a single form ? How many tables are involved ? What are the fields of the master and child tables? I think you can put in single form just one record of the master table and all records of the child table, but you can't put all that stuff in single page form. Why don't you put it this way: Master table Field1 Field2 Field3 buttons |<New> | |<Save>||<Cancel>| <HR> Child table Add zone temp-Field1 temp-Field2 temp-Field3 <BR> buttons |<Add>||<Save>||<Cancel>| <HR> <!-- Added child Records --> A form dynamicaly created 1st line Field1 Field2 Field3 2nd line Field1 Field2 Field3 3rd line Field1 Field2 Field3 etc. When you press any button of the first set you insert the record of the master table, reload the page showing the master record added and the second set of buttons. Put the child data in the "buffer" input tags and press <Add> creates a form line with the the child data you want to save to the database. When you press the <Save> button of the second set you save all records added to the child table. This is the best solution I can suggest you. The code of course is not very simple, but the approach you are using is not too, add record by record of each table with a specific form to each one is quite simple but you need more pages. The code I send to you can help you to do the task of create the child form "on-the-fly", just change from the table lines to input tags. You can but the secon set of buttons on the bottom of the form, but I think the top position is better. I hope this helps. Jayme. http://www.conex.com.br/jjeffman -----Mensagem Original----- De: Ian Evans <ianevans@friedspamdigitalhit.com> Para: <php-db@lists.php.net> Enviada em: sábado, 7 de outubro de 2000 23:13 Assunto: Re: [PHP-DB] Designing an input form for one-to-many etc. > I figured a more visual look at the type of insert form problem I'm > facing might help. > > If I can get this input form problem sorted out, I can then tackle the > real fun of writing the logic to insert into multiple tables while > grabbing ID numbers to insert into other tables, while checking to see > if the person/title/whatever already exists, while...man, Juan Valdez is > going to have to make a special coffee trip just for me. :-) > > Here's the visual: > http://www.digitalhit.com/nominee-example.html > > Again, thanks for any advice. > -- > Ian Evans > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#3410) next »