I have a master-detail application with one master and two detail pages, like below:
- Order (Master Page)
- Test_1 (1st detail page)
- Test_2(2nd detail page)
Master has a dropdown field (order_Type) with “Standard” and “Target” options. When user select “Standard” option on Master Page and submit then user should redirect to test_1_list.php detail page. Similarly when user select “Target”option on Master Page and submit then user should redirect to test_2_list.php detail page.
I have used this following code on Add Page: After record added event but not working as I expected.
If($_SESSION[‘ord_Type’]==’Standard’)
{
header (“Location:test_1_list.php”);
} else{
header(“Location:test_2_list.php”);
}
exit();
if I select “Standard” option in first time then its redirect to the expected test_1_list.php page but after that if I select “Target” option for another order then it is redirect the same test_1_list.php page instead of test_2_list.php.
I used
unset($_SESSION[‘ord_Type’]);
at the end but steel it does not work. Any idea please. Thanks in advance.