I would like to add a select option in my html form where the user can select options for their plan… I have heard of populating drob down box from the database but can i just do a basic drop down box as follows
Does the select id correspond with the name in the database column? And i guess in my table… i should see either a 1 or 2 instead of the word primer or level 1
It can be used in a css selector like a class, but that is not recomended, due to the very high specificity of id selectors.
One use is as a target for anchors in a page, so you can have a link “jump” to a specific part of the page, Eg:
<a href="#subscribe">Go to Subscription</a>
But in the context of form inputs, it is most commonly used to link labels to inputs, Eg:
The name will determine the key of the input in the POST array.
So in the above example where the name is level you would have $_POST['level'] in the post array with the chosen value as its value.