Skip to main content
May 4, 2006
Question

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

  • May 4, 2006
  • 2 replies
  • 366 views
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!
This topic has been closed for replies.

2 replies

May 6, 2006
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.
May 4, 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.
May 6, 2006
Do you mean the Recordset?