Contents

 
Home
PHPRunner 6.0 manual
Prev Page Next Page
 
 

Redirect to details page after master record was added

 

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.

yellowbulbNote: 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

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)