|
Sometimes you need to redirect visitor to the details table (i.e
Order details) right after new master record was added (Orders
table). The trick is to pass correct master key to the details
table. Once user redirected there she can start adding details
records using Inline or regular Add.
The following code needs to be added to AfterAdd event of the master
table.
Note: Change the values listed in
red to match your specific needs.
header("Location: order_details_list.php?mastertable=orders&masterkey1=" . $keys["OrderID"]);
exit();
|
In this example:
order_details_list.php - URL of the
details list page
orders - master table name
OrderID - name of primary key of the
master table
|