This topic is locked

Default value changed after file saved

8/4/2008 2:00:27 AM
PHPRunner General questions
J
jianwong author

Hi
I'm new to this application and I have this problem could not be solved therefore posting it here hoping that someone could help.
At the Add new listing page the Contact No field by default displayed the Contact No as required, however, after saved the Contact No changed to UserID value by itself as shown in the View Listing page. In the After Successful Login Event the following code was added:
global $conn;

$rs = db_query("select `Contact No` from `_User` where `Username`='".$_SESSION["UserID"]."'",$conn);

$data = db_fetch_array($rs);

$_SESSION["Contact No"] = $data["Contact No"];
I have added another set of code, as below, after the above for User Contact Name to be shown by default and it works.
global $conn;

$rs = db_query("select `User Contact Name` from `_User` where `Username`='".$_SESSION["UserID"]."'",$conn);

$data = db_fetch_array($rs);

$_SESSION["User Contact Name"] = $data["User Contact Name"];
Anyone have any idea how to fix it, please help.

J
Jane 8/4/2008

Jian,
This issue happens because you've set up Contact field as OwnerID on the Advanced security settings dialog on the Security tab.

Choose another field as OwnerID or select User can see and edit other users data security method.