View Full Version : help with limiting recordset to the user

11-08-2009, 10:46 PM
Can anyone help?

I am having trouble working out how to limit what the user can access when they login, ie: only their profile.

This would include a photo as well.

I can display an image but it is not linking in with the user who is logged in.

Many thanks

11-09-2009, 12:03 AM
are you using the dw wizard to do this or hand coding?

11-09-2009, 06:27 AM
DW wizard is what i am using

11-09-2009, 06:41 AM
one way would be to select your recordset based on the user as in:
if each member has a unique ID your select statement would be (ie) select * from TABLE where id= $login.
$login being the user id

11-09-2009, 06:16 PM

I can not seem to get it to work, do I set the recordset in the login or on the profile page? its not doubt obvious but I just cant see it

11-10-2009, 12:03 AM
profile page. i have to say it may be difficult with dw codebut on the profile page the recordseet should include a where clause based on the user id or name being equal to a field in that users record. it will depend on how you have set up the info in the database. you will have to collect the data from the login but i cant say how you have set it up from here

11-10-2009, 07:55 AM
i am using the developer toolbox login wizard, is that relevant to the profile page record set

11-10-2009, 08:13 AM
i just tried setting one up using the dw wizard. login is verified using $_SESSION['MM_Username']. this will be carried over all the protected psges after login.

on your profile page you need to select from the table you have set up for the members select from TABLE where user=$_SESSION['MM_Username'];
where user is the fielad that contains the same value (name ) as the login value
that will select the record belonging to that user.
i think in the wizard you need to use entered value, but i have to say i havent used it in a long time, if not that post back and ill try to test it

11-10-2009, 08:47 AM
my users table consists of

Session bits

11-10-2009, 08:56 AM
I have worked it out, using the simplified wizard, using session varible and changing it to kt_login_id. Many thanks for you help

11-10-2009, 08:58 AM
glad to hear