This topic is locked

How to Reference readonly fields

7/2/2007 8:02:34 AM
PHPRunner General questions
D
dcrera author

Hi,
On my Edit form, how would I reference a readonly field in the Before Record is Updated event ?
Thanks

J
Jane 7/2/2007

Hi,
to select readonly values in the BeforeEdit event use this code:

global $conn,$strTableName;

$rs = db_query("select * from ".$strTableName." where ".$where,$conn);

$data = db_fetch_array($rs);

echo $data["FieldName1"];

echo $data["FieldName2"];



where FieldName1 and FieldName2 are your actual field names.

D
dcrera author 7/2/2007

Thanks Jane.
I was hoping I would not have to re-read the file.

Hi,

to select readonly values in the BeforeEdit event use this code:
where FieldName1 and FieldName2 are your actual field names.