Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I filter which records are displayed in my dynamic table?

Guest
May 03, 2006 May 03, 2006
I have what I think is probably an easy question for anyone who is experienced with PHP/MySQL and Dreamweaver (which I am not).

I have a website where users login, and then have access to their homepage which displays a dynamic table of all of the records that they have inserted into a database (this page also has a link to the form where they submit a record). However, right now I can only get to display all records that have been inserted instead of only the ones that they have inserted (which is what I want). How can I accomplish this?

I already have a session variable, 'MM_username', which allows me to bind the user_ID to anything I need to, and when a user inserts a record, their 'user_ID' is already inserted into a column in that record for that table, so I'd like to display the dynamic table in a way that filters it out so it only shows the records that match the logged-in user's 'user_ID'.

I've tried to use the filter function in the recordset dialog box, nut I just can't get it to work correctly. Any help on this would be much appreciated!
TOPICS
Server side applications
367
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 04, 2006 May 04, 2006
In the DW data set tell it to filter the field based on your session variable. I'm not real familiar with PHP but I think it's something like $variablename.

That should do it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2006 May 05, 2006
Do you mean the Recordset?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 06, 2006 May 06, 2006
LATEST
I already tried that. I set the table to filter out and display only the records that match the landlord ID to the session variable(which I named 'Landlord_ID' not 'MM_username ' like I said earlier). When I tried to simply insert the session variable into the page just to see what data would show up, the result is just a blank space, so the session variable itself apparently has no data value to echo in the PHP form.

Because of that, I have no idea how to tell dreamweaver to filter based on the Landlord_ID, even though I CAN echo the landlord ID variable in the recordset, I can't figure out how to put that runtime value in the filter.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines