This topic is locked

Save goes to the next menu Add page?

11/25/2008 6:24:31 AM
PHPRunner General questions
S
swanside author

OK, Now my project has the following Tables.
job.Job_No

risk_assses.Job_No

appliance.Job_No

elec_test_Job_No

gas_test.Job_No

job_sheet.Job_No
job is my master table and risk_assess is the child to that, then when a new record has been added in risk_assess I then get a link to go to appliance, when a new record has been added to appliance, I get a link to go to elec_test, when a new record has been added to elec_test I get a link to go to gas_test. When a new record has been added to gas_test I get a link to job_sheet.

They are all linked by the Job_No
In each or the after record added in the events I have put in rediredt to that records return page i.e. risk_assess_list.php?a=return for the risk_assess back to list, and appliance_list.php?a=return for the appliance back to list.
What I want to do, is from the risk_assess page when I click on the save, for it to take me to the aappliance_add.php for that same record based on the Job_No.
Any help on that please?
Thanks

Paul.

J
Jane 11/25/2008

Paul,
I suppose you need to redirect to the edit page, not add page.

If you add four records for each view you will create four records in the main table.
To redirect to the edit page use following code:

header("Location: TableName_edit.php?editid1=".$keys["Job_No"]);

exit();