This topic is locked

redirect master --> child

4/9/2019 4:40:56 PM
PHPRunner General questions
A
alfe author

Hi

I have a master table with several child tables. I want to retrieve a value of a master table's field on 2 child pages. I use this function on a snippet on each child table :
global $dal, $strTableName;
if ($_SESSION[$strTableName."_masterkey1"])

{

$tblOrders = $dal->Table("tbl.sortie_p");

$rs = $tblOrders->Query("id_sortie=".$_SESSION[$strTableName."_masterkey1"],"");
if ($data = db_fetch_array($rs))

{

echo "Heure tot: ".$data["tot_jour"]."
";

}
}
It works perfectly with a "standard process" when after add an element you go back to the master page list and you add the child in their tables. To enforce the users to fill all the child tables, I redirect by using header location in AfterAdd event on the 1rst child page and from the 1rst to the 2nd child page. In this case, the function above failed without sending an error msg. Someone has an idea ? Thanks
AF