?
Solved

Parsing <Select> Tag in PHP from Method Post

Posted on 2003-11-13
1
Medium Priority
?
288 Views
Last Modified: 2013-12-13
I have a drop down list object on one of my web pages - when I Post to my .php file, how do I move through the list to find the selected item? I'm trying to sequence through all the <Select Tag items so I can write them to a table - the selected item I will actually skip because this task is to delete the selected item from the drop down list.

Thanks for any help...
0
Comment
Question by:rfresh
1 Comment
 
LVL 6

Accepted Solution

by:
DoppyNL earned 500 total points
ID: 9745795
the browser will only sent back a single value to the server; the value wich was selected. all other values will not be sent back to the server.
So you don't have to walk through those values.

simply use this variable:

print($_POST['name_of_select_box']);

to print out the value returned.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question