Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: option question

  1. #1
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts

    option question

    I am adding a drop-down to my Subsection page to allow users to sort article summaries different ways.

    In this sample...
    PHP Code:
        <option value="by-date">Date</option>
        <
    option value="by-title">Title</option

    How do I use PHP to make "Date" the default value, but still allow the user to choose another value AND make whatever value is selected "sticky"??

    Sincerely,


    Debbie
    Last edited by doubledee; 05-02-2014 at 03:01 AM.

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,237
    Thanks
    12
    Thanked 340 Times in 336 Posts
    How do I use PHP to make "Date" the default value
    use the selected attribute.

    make whatever value is selected "sticky"??
    set the selected attribute to whatever option element you have the value for in your system (POST, DB, ...).
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •