Hi,
I've been trying to create a php file that will generate two forms, updating two seperate tables.
The first form, should appear only once, allowing the user to enter details about a house, updating the house table.
The second form should then be generated, and the user should be able to enter as many records as they like, so I need the form to keep refreshing after each submission. This form should also take the house_id from house and insert it into the room table.
At the moment the forms are generated the correct number of times. But the house details get submitted to the database ok then blank records are added to coincide with the number of times the room form is submitted. I know why this is happening, but if I dont have the hidden fields in pageno 1, after the house details are entered, nothing else happens.
The room details get uploaded ok, but id from house is missing.
So my questions are, how can I ensure that only one record is added for each house. And how can I get the house_id from house into rooms?
I have attached my code, any help would be appreciated.
E.
PS sorry its such a long winded question.