?
Solved

Parsing <Select> Tag in PHP from Method Post

Posted on 2003-11-13
1
Medium Priority
?
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

770 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