This topic is locked

Crazy behavior

7/25/2008 11:25:05 AM
PHPRunner General questions
V
vytb author

for redirection from table a (add) to table b (add), I use a following afteradd event code in table a
$_SESSION["b_masterkey1"] = $values['id'];

header("Location: b_add.php");

exit();
where 'id' is the masterkey of the table a.
The thing is that sometimes it does not function. Does anybody have a clue why?

J
Jane 7/28/2008

Hi,
try to use this code:

header("Location: b_add.php?mastertable=a&masterkey1=".$values["id"]);

exit();


Then check passed variables in the Add page: Before process event:

if (@$_REQUEST["mastertable"])

$_SESSION["b_mastertable"] = $_REQUEST["mastertable"];
if (@$_REQUEST["masterkey1"])

$_SESSION["b_masterkey1"] = $_REQUEST["masterkey1"];