Ignore any missing punctuation, my email client strips them out if they are at the end of the line.
The select list: <select name="carriers" <option value="@utext.com">Unicel <option value="@email.uscc.net">U.S. Cellular </select The PHP that should echo whatever is gotten: echo $_POST['carriers']; The error (line 2 is the php code above):Parse error: parse error in /var/www/html/mehgcap/sms/sms.php on line 2
PHP4.3 (I believe), but that should not matter. Have a great day, Alex
----- Original Message ----- From: "E.J. Zufelt" <everett@xxxxxxxxx To: <programmingblind@xxxxxxxxxxxxx Date sent: Tue, 2 Dec 2008 13:47:16 -0400 Subject: Re: quick php and forms question
Alex,
Can you please send the html code for the select list, the exact
line you
use to get the value in PHP and the parse error to the list?
Thanks, Everett
----- Original Message ----- From: "Alex Hall" <mehgcap@xxxxxxx To: <programmingblind@xxxxxxxxxxxxx Sent: Tuesday, December 02, 2008 1:41 PM Subject: quick php and forms question
Hi all,I have a php script that has to get the value of the selected
option in a
select list. I am trying to see exactly what $_POST['carriers']
returns
(carriers is the name of the list and I echo that line), but am
getting a
parse error on that line. What are the rules for select lists
in php? Can
I not get the selected value (not the selected text) like I
would get the
value of, say, a text input? Thanks for any help!
Have a great day, Alex __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind