WNJ
Posts: 4
|
| Posted: 02/02/2007, 8:00 AM |
|
I want to set the value of a field to be inserted into a table to the users session ID - how do I do this? I know it should be easy I'm just missing something.
WJ
|
 |
 |
Martin K.
|
| Posted: 02/03/2007, 12:39 AM |
|
Hello.
In your Where.
Where your_userID_Field = UserID
Type Session.
Greets martin k.
|
|
|
 |
kangus
Posts: 47
|
| Posted: 02/03/2007, 11:09 AM |
|
In HTML mode click on the hidden field for the userid, in the Properties window add CCGetSession("UserID");
or
CCGetUserID();
as the default value for that field and set the field as required.
in order for this to work sessions must be on or in other words they have to have logged in.
_________________
PHP 4/5 mySQL 4.1/5 CCS 3.x |
 |
 |
tonyk
Posts: 163
|
| Posted: 02/09/2007, 6:08 AM |
|
In order to prevent spoofing of the user_id entered in the database it might be sensible to include the set function in the before_insert and before_update events which take place server side and therefore outside the control / interception of the client.
Tony
|
 |
 |