Dear all,
I’using sc_redir from FORM(A) form_orders to open a confirmation form FORM(B) form_yes_no_order . The output of FORM(B) is glo var like [yes_no] that could be 1 or 2.
The sc_redir of FORMA(A) is within the event OnAfterUpdate:
sc_redir(form_yes_no_order.php);
if ([yes_no] == 1 )
{ echo " Do something if yes " . [yes_no]; }
elseif ([yes_no] == 2)
{ echo " Do something if no " . [yes_no]; }
else
{ echo " Something else " . [yes_no]; }
The same in FORM(B) under OnAfterUpdate:
[yes_no]={yes_no};
sc_redir(form_orders.php);
My question is : when I come back from confirmation form FORM(B) to FORM(A) what happens ?
Is it correct to make the test of answer under OnAfterUpdate as above or have I to put the test under some other event ??
Shortly when you call another form which is the event that is done first ?
if ([yes_no] == 1 )
{ echo " Do something if yes " . [yes_no]; }
elseif ([yes_no] == 2)
{ echo " Do something if no " . [yes_no]; }
else
{ echo " Something else " . [yes_no];
Thanks