This topic is locked

Passing data from beforead to afterad event

7/4/2006 12:13:48 PM
PHPRunner General questions
coolbyte author

It seems that $_REQUEST is not available at the afteradd event. Is there a metod to post data from beforead event to afterad event?

J
Jane 7/5/2006

Hi,
$_REQUEST array does work in both BeforeAdd and AfterAdd events.
Anyway you can use session variables to pass values between event handlers.

I.e. put this into BeforeAdd event:

$_SESSION["field1"] = $values["field1"];



then use $_SESSION["field1"] in AfterAdd event.

Alexey admin 7/5/2006

Hi,
$_REQUEST array does work in both BeforeAdd and AfterAdd events.
Anyway you can use session variables to pass values between event handlers.

I.e. put this into BeforeAdd event:

$_SESSION["field1"] = $values["field1"];



then use $_SESSION["field1"] in AfterAdd event