This topic is locked

Block field in user groups

2/5/2011 6:53:47 PM
PHPRunner General questions
S
sandrotab author

Using PHPRunner 5.3 and when I'm editing a record, I would hide a field "Area" to all users in the group 7.
Copy the code but unfortunately it does not work.

In "Edit page: Before process" tells me: Undefined variable: xt

In "Edti page: Before the display" does not work.
global $conn,$userid;

$sql = "select GroupID from gestptf3_ugmembers where UserName='".$_SESSION["UserID"]."'";

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

$data = db_fetch_array($rs);$userid = $data["GroupID"];

if ($userid=="4")$xt->assign("Zona_fieldblock",Disable);

if ($userid=="7")$xt->assign("Zona_fieldblock",false);
I wish I could hide or block the change in the field.

Can someone help me with the code?
Thanks