This topic is locked

Button Problem updating record with user ID

1/12/2014 6:58:48 PM
PHPRunner General questions
A
andreas.knab author

Hi ,
two Tables:

(Master) user_logon with fields: UserID, Email, ... and Zugeteilte_Kurse (prepopulated with "not passed")

(Detail) Kurse with fields: ID, SessionID, ..... and Kursname
Relation: Zugeteilte_Kurse to Kursname
I habe a button to update a field in the logon table in the viepage of Kurse.

I use for the button:
$tblUsers = $dal->Table("user_logon");
$tblUsers->Param["User_logon_id"]= $_SESSION["UserID"];
$tblUsers->Value["Zugeteilter_Kurs"]="passed";
$tblUsers->Update();
but nothing happens when I press the button.
removing the $_session["userId"] with a numer e.g. "1" makes it working fine .But only for the one ID of course.
How can I use the $_SESSION["UserID of the actual user to Point to the right record?

I also want to update only the one where the field "Zugeteilter_Kurs" is the same like in the Table where the button is...

Any Idea?
Thanks in advance

Andreas