This topic is locked

'Before display' event

10/10/2008 12:24:39 PM
PHPRunner General questions
V
vytb author

In order to prepopulate the field 'a' from the earlier visit of the same person, the following event (add page, before display) worked in v.4.2 and does not in v.5.0.
What would be the reason?
[codebox]global $conn, $strTableName;

$str = "select visit.a

from visit where SubjectId=".$_SESSION[$strTableName."_masterkey1"];

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);
$smarty->assign("value_a",$data["a"]);[/codebox]

Sergey Kornilov admin 10/10/2008

In version 5.0 use the following:
$xt->assign("value_a",$data["a"]);
See PHPRunner manual Advanced topics->PHPRunner templates for more info.