Solved

Parsing <Select> Tag in PHP from Method Post

Posted on 2003-11-13
1
261 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 125 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

809 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