Is there a way to say onchange, take the value # and change the “form action” based on the number selected, then do this.form.submit();”.
<form action=”submit.php?carts=[#]” method=”post”>
<select>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
<option value=”4″>4</option>
<option value=”5″>5</option>
</select>
</form>
For example, say I choose value option 1.
Then the form action changes to; <form action=”submit.php?carts=1″ method=”post”> Then after that changes, do a “onchange=”this.form.submit();”.
The reason I need this instead of putting the url in the value is because I have the php script in submit.php reading the header “carts” then the number after it, it then adds additional info based on the number. Also I tell it to pull the value # in the select to display what was previously selected selected. Therefore, in submit.php I will display the drop down list again with the number selected, instead of being reset to choose a #. So in submit.php the “<option value=”1″>1</option>” will read “<option value=”1″ selected>1</option>”.