SELECTED in drop down

Discussion in 'HTML & Website Design' started by basketmen, Oct 27, 2011.

  1. #1
    Hi guys, i have a drop down code below



    the output are like this



    i want after the drop down choosed by user, it will add SELECTED next time they opening the drop down again

    i am still dont know how to put the SELECTED there, please help what is the code to add SELECTED, i only have variable mod[cpu] and $content[cpu]


    i already tried in bold below, but still not working





    please share your knowledge
     
    basketmen, Oct 27, 2011 IP
  2. mike30

    mike30 Well-Known Member

    Messages:
    887
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Create a session variable with an ajax call once the option is selected and make "selected" = session variable.

    ~Mike
     
    mike30, Oct 27, 2011 IP
  3. Jason Clay

    Jason Clay Active Member

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    91
    #3
    Have you tried using an echo on the $content[cpu] ?
     
    Jason Clay, Oct 27, 2011 IP