Hi, I am somewhat new to PHP and having a bit of trouble figuring out how to grab the value from a drop down menu from a form. Also I want to assign a number to the selected option. For Example, the person will select computer memory from the drop down menu and when they click the submit button it will echo the selected memory and the price. Whats the best way to do this? Thank You
pgmarco 0 Newbie Poster
Recommended Answers
Jump to PostAdding some info with the above code, if you have price in your sql table then
<?php if(isset($_REQUEST['send'])) { $mydrodown = $_REQUEST['mydrodown']; echo "You have selected ".$mydrodown." from drop down."; //Establish the connection to the database //Make query to select the price based on the $_REQUEST['mydrodown']; //Display …
All 4 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.