This topic is locked
[SOLVED]

 Hopefully simple - how to automatically default to a val

12/16/2010 3:59:29 PM
PHPRunner General questions
K
karmacomposer author

I need to read the $_SESSION variable for the UserID and then extract the RecruiterID from the RecruiterData table.
This is what I wrote:
$value=($_SESSION["UserID"] ->$data["RecruiterID"])
I know it's wrong. How would I make this statement correct? This is for the DEFAULT value in the ADD page.
Mike

romaldus 12/16/2010



I need to read the $_SESSION variable for the UserID and then extract the RecruiterID from the RecruiterData table.
This is what I wrote:
$value=($_SESSION["UserID"] ->$data["RecruiterID"])
I know it's wrong. How would I make this statement correct? This is for the DEFAULT value in the ADD page.
Mike


Please read this post :

http://www.asprunner.com/forums/topic/15048-sessiongroupid-for-dynamic-permission

K
karmacomposer author 12/17/2010



Please read this post :

http://www.asprunner.com/forums/topic/15048-sessiongroupid-for-dynamic-permission


OK. I took a look at that and this is what I came up with:
The RecruiterData table holds the recruiter's data (duh). The RecruiterID is what I am after. That is the key field for this table. I noticed that the UserValidation table (for initial login) is being queried. The GroupID does determine what group recruiters belong to - in this case, group is 6 or Recruiters.
In the AFTER PROCESS on the ADD page:
$rstmp = CustomQuery("select UserID from UserValidation where UserName='".$_SESSION["UserID"]."'");

$datatmp = db_fetch_array($rstmp);

$_SESSION["RID"] = $datatmp["RecruiterID"];
In the assignedTo field dialog, I used Read Only as the state and put the following default: $_SESSION["RID"]
What am I doing wrong?
Mike