Home > Net >  Adding fixed data to html dropdown
Adding fixed data to html dropdown

Time:08-10

I am creating a html dropdown but need to know how i can add data once dropdown is selected? e.g once i select say summer i want it to automatically populate a list of activities that can be done in that season. Is this possible in HTML? Below example is what i am starting with but after that not sure how i can add fixed data once a season is selected. I am using HTML as the website only has html option for us to create these kind of things. There is also sql but not good with sql

<label for="Name">Season activities:</label>
<select id="Season" name="Seasons">
    <option value="winter">Winter</option>
    <option value="summer">Summer</option>
</select>

CodePudding user response:

Hi no you can't do that just by html you need to write javascript to get data from backend, and you need to handle request in backend by php and you need to store data in database by sql

for more information you can see links below

  • Related