1
Agent00
HTML Drop down list values to PHP values
  • 2006/1/17 19:56

  • Agent00

  • Just popping in

  • Posts: 9

  • Since: 2005/11/16


Hi,

I try to get the value from a html drop down list(when the user selected certain values from the list) then set it to a php variable, but I was unable to do it, can anybody help me!


ex: html
<select id='num'>
<option> 1 </option>
<option> 2 </option>
<option> 3 </option>
</select>

if the user selected 3, how can I set that value to a php variable.

thanks

Jason

2
iver2435
Re: HTML Drop down list values to PHP values
  • 2006/1/20 6:51

  • iver2435

  • Just popping in

  • Posts: 10

  • Since: 2006/1/19


I'm going to assume a couple of things here...

1) This is a part of some kind of form that goes on a website, like an order form or something.

2) After they fill out the form, they click "Submit" or "Order" or whatever.

3) The PHP script will take over and process it from there...

If those three assumptions can be made, then you can accomplish it very simply by extracting it from the $HTTP_POST_VARS array when you pass it to the PHP script.

I am still a little bit of a noob at PHP, so if I am wrong on this one, please let me know...

Login

Who's Online

184 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits