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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.