troubleshooting Question

pass drop down value to php

Avatar of usmbay
usmbayFlag for United States of America asked on
4 Comments1 Solution1188 ViewsLast Modified:

I want to return the value from drop down list to use it in php script

<form name="test" method="post" action="--WEBBOT-SELF--">
      <select size="1" name="period" onChange="getValue(this.form)">
      <option selected value="all">Select a year</option>
      <option value="2008">2008</option>
      <option value="2007">2007</option>

<SCRIPT language=JavaScript>
function getValue(form) {

var val=form.period.options[form.period.options.selectedIndex].value;


<FORM name="form1" method="post" action="access.php?market=ca">
      <SELECT name="supplier" onChange="document.getElementById('form1').submit();">
            <OPTION value=""></OPTION>
            <?PHP echo $supplierCA;?>

so the user select the year and then select a supplier from second dropdown list it goes to access.php
I want read the value of year in this access.php

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros