Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to set multiple values in a option box

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 251
    Comment on it

    Hello Reader's! If you need to set a option box with multiple select options then you can use the logic below:-

    Logic is to set the name of your option box in array format, Like

      <select name="flower[ ]" multiple>
    

    Lets see the example below:-

    <html>
            <body>
                    <form method="post" action="value.php">
                            <select name="flower[ ]" multiple>
                                    <option value="flower">FLOWER</option>
                                    <option value="rose">ROSE</option>
                                    <option value="lilly">LILLY</option>
                                    <option value="jasmine">JASMINE</option>
                                    <option value="lotus">LOTUS</option>
                                    <option value="tulips">TULIPS</option>
                            </select>
                            <input type="submit" name="submit" value=Submit>
                    </form>
            </body>
    </html>
    

    Now the user can select the multiple values and each values will be generated in the array keys

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: