I think my answer http:#a24616517 was correct.
Main Topics
Browse All TopicsHi everyone.
I was trying to get the selected value from a combo box and and insert it into the database. The combo box itself is populated from the database.I am pretty new to PHP so I just need a simple example. basically this value is a relational id that has to be inserted into the record in the second table.
Thank you all in advance,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I think my answer http:#a24616517 was correct.
Business Accounts
Answer for Membership
by: cxrPosted on 2009-06-12 at 15:01:23ID: 24616517
When the form is submitted, the value from the <select> dropdown can be fetched from the $_POST or $_REQUEST array. The $_POST array is only populated if you have method="post" in the form, $_REQUEST is populated for both method="post" and method="get" (and also for URL parameters).
d']) ? (int) $_REQUEST['project_id'] : false;
So, to fetch the project id, you can for instance do this:
$project_id = isset($_REQUEST['project_i
...and to insert it into the database, something like this:
if($project_id) {
$sql = "insert into TableName set project_id=$project_id"; # additional columns are probably needed
mysql_query($sql) or die(mysql_error());
}