Jump to content

making data unselectable in a dropdown list


hosker

Recommended Posts

I have a form created with code already written. I am in need of a push in the right direction or a potential tutorial on this issue i have. I am running a fanatsy golf website where the user will pick one golfer each week and the cannot select them again. Is there a way I can remove that data from the list for the next week when the user makes his selection or can I have that data another color and unselectable. If you want code, please let me know and i can provide it. Thanks in advance for your help.

 

 

p.s. the list data is stored in a MySQL database.

Well you will just need some way of storing in the database which option they previously selected.  If you have users that are logged in (and therefore probably stored in a users table) then you will just need another table in the database, which records the id of the option they selected and their user id, and then when you come to output the list again, you can check against the other table to see which they selected previously, and alter how that one appears or whatever you want to do with it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.