close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show database information according to UserID

Thread began 4/30/2012 11:22 am by joerg431091 | Last modified 11/13/2014 10:11 am by Jason Byrnes | 1244 views | 6 replies |

joerg431091

Show database information according to UserID

Hi,

I probably have a rather easy question (shame on me that I can not figure it out) and apologize in case this was already covered (could not find anything in the forum).

Our website has a "Customer Only" area and I would like to display a "Dashboard" where, after signing in, they can post, update and delete information (recipes,images, etc). However, I of course only like them to have access to the information that this particular user/customer has posted. The information is usually in 2 different DB tables (the recipes for example that the user can insert are in the "Recipes" table of the DB and the User information for this particular user is in the "User" or "Member" table of the DB)

So somehow I guess I have to link or filter the results to the userID but have not figured this out yet.

Could you give me some pointers that even I as a beginner would understand?

Thanks a lot and best regards,

AJ

Sign in to reply to this post

Jason ByrnesWebAssist

when the user logs in, their user id is stored in a session variable.

on the login page, open the server behaviors panel and double click the Security Assist Authenticate user server behavior. On the Session Variables tab, make note of the name of the User ID session that is being created.


you can use this session to filter the tables to return the information for the logged in user.

when creating a recordset set the filtering section to use the user ID column and a session variable, for the session variable name, enter the name of the session created at login

Sign in to reply to this post

joerg431091

Hi Jason,

Thanks a lot for your help. I am not quite sure if I am really getting it yet but I think I am getting closer.

It looks like I am getting the entries of the logged in user now but each entry repeats itself 4 times in the result pages.

Any Ideas what I might screwed up there?

Thx. again,

AJ

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please in a zip archive.

I have no way of knowing what may be wring without being able to see the code.

Sign in to reply to this post

joerg431091

Hi Jason,

I think I figured it out. It seems like I had the filter set incorrectly.

Thanks a lot for your help and best regards,

AJ

Sign in to reply to this post

Andre

Getting the current users information

Hello Jason i seem to be having the same issue as above that when i login as a User ID3 its giving me the details of User ID1 all the time. So i tried the above & now i am not seeing anything?

I have followed all the instructions above but it gives me a blank page on the browser?

I have zipped up the page for review, the login.php page is where i am logging into & the loggedin.php page is where i want to display the users information?

Can you have a look & let me know what i am doing wrong?

Sign in to reply to this post

Jason ByrnesWebAssist

a blank page means that a php error is occurring but error reporting is turned off.

to turn error reporting on, add the following code at line 1:

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>



once we know what the error is, we will be able to troubleshoot the cause.


The zip file you sent seams to be corrupted, i am not able to open t to see the files inside.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...