hi every body
I am working on web project and I want a simple code
I have made a drop down list in my HTML
and I want to save the selected value in a PHP variable
so I can insert it to my database is this is the correct way?
I cant use post because i don't have a database with category values
please help me with any method in HTML or PHP
that retrieve a selected value from drop-down list
I am working on web project and I want a simple code
I have made a drop down list in my HTML
and I want to save the selected value in a PHP variable
so I can insert it to my database is this is the correct way?
Code:
category <select name="category_type" > <option <?php if ($_POST['selectbox'] == 'Networks') echo '$selected="Networks"';?>> Networks</option> <option <?php if ($_POST['selectbox'] == 'Securty&systems') echo '$selected="Securty&systems"';?>>Securty&systems </option> <option <?php if ($_POST['selectbox'] == 'Software Develpments') echo '$selected="Software Develpments"';?>>Software Develpments</option> <option <?php if ($_POST['selectbox'] == 'Web&information') echo '$selected="Web&information"';?>>Web&information </option> </select> </br>
I cant use post because i don't have a database with category values
please help me with any method in HTML or PHP
that retrieve a selected value from drop-down list
Comment