This topic is locked

copy values of master table to child table

3/19/2008 12:27:44 PM
PHPRunner General questions
H
hassanprogrammer author

I have 3 tables called intake houshold and service. On the intake I collect basic info in dependent drop downs. Some of that info is repeated on the houshold info table but i dont want to keep selecting the same things how do I get what I have already added from intake to just cary over to my household and then after words to my service. Example I fill in cutomer name in intake. Then When I go to houshold I need the cutomer name so I fill it in again and I also needed it in my service table so I just keep doing the copy past thing. Hope this was clear. Thanks

Alexey admin 3/20/2008

Hassan,
use Default values for this.

I.e. set the Default value for your field to:

@$_SESSION["FieldName"]


then add the following code to the Befoer record added event:

$_SESSION["FieldName"] = $values["FieldName"];