Partage
  • Partager sur Facebook
  • Partager sur Twitter

Select in html

    25 juin 2016 à 16:15:16

    Hi guys , i'm made a select option in my html page. Now i would like that when i use the first option in category it show me some name ..... and the same thing with the second category ???

    -
    Edité par samersboui 25 juin 2016 à 16:16:41

    • Partager sur Facebook
    • Partager sur Twitter
      25 juin 2016 à 16:23:49

      http://www.w3schools.com/tags/tag_optgroup.asp

      the correct use of label in select here ! don't use< div></div> for option

      • Partager sur Facebook
      • Partager sur Twitter
      Depot github (Siteduavoir)    , Site web Perso,  Sitedusavoir .. L'Informatique comme passion ,Reve de dev pour Zeste de Savoir
        25 juin 2016 à 17:07:30

        How can i use it in register form ?

        • Partager sur Facebook
        • Partager sur Twitter
          25 juin 2016 à 17:15:23

          Malnux Starck a écrit:


          to send information with select it's simple

          you give name to select like that and give value to option like that :

          <form method="post" action="send.php">
          <select name="car">
            <optgroup label="cours">
              <option value="Maths">Maths</option>
              <option value="Physique">Physique</option>
            </optgroup>
            </select>
          </form>


          use variable $_POST['car'] to take information content in option when you select for example physiqe

          $_POST['car'] 


          content value of option of physique

          -
          Edité par Malnux Starck il y a moins de 5s



          -
          Edité par Malnux Starck 25 juin 2016 à 17:22:51

          • Partager sur Facebook
          • Partager sur Twitter
          Depot github (Siteduavoir)    , Site web Perso,  Sitedusavoir .. L'Informatique comme passion ,Reve de dev pour Zeste de Savoir

          Select in html

          × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
          × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
          • Editeur
          • Markdown