Need help send dropdown value

hi everybody,
i am trying to send dropdown list value in php with the link like
anypage.php?size=dropdownlistvalue

the full code is given below

<div id=“sizes”>
<form name=“listform” action=“” method=“post”>
<select name=“list_size” id=“list_size” style=“border:1px solid #8C8B8B;width:202px;height:25px;color:#8C8B8B;text-transform:uppercase;padding:2px;”>
<option value=“”>Sizes</option>
<option value=“XL”>XL</option>
<option value=“L”>L</option>
<option value=“M”>M</option>
<option value=“S”>S</option>
<option value=“XS”>XS</option>
</select>
</form>
</div>
<div id=“add”>
<p><a href=“phppage.php?action=add&id=<? echo $getproductid; ?>&size=???”>add</a></p>
</div>

what should i do to send selected list value at the place of ???.

please help to get rid of it.

thanks in advance.

That’s not the way it works. Add a submit button to the form, and if “phppage.php” is another script, put it in the “action” parameter of the form tag.
In “phppage.php”, you’ll be able to access the “list_size” through the $_POST array:

$_POST[‘list_size’]

for that use javascript like::
<select onchange=“window.open(this.options[this.selectedIndex].value,‘_top’)”>
<option value=“”>Sizes</option>
<option value=“./phppage.php?action=add&id=<? echo $getproductid; ?>&size=XL”>XL</option>
<option value=“./phppage.php?action=add&id=<? echo $getproductid; ?>&size=L”>L</option>
<option value=“./phppage.php?action=add&id=<? echo $getproductid; ?>&size=M”>M</option>
<option value=“./phppage.php?action=add&id=<? echo $getproductid; ?>&size=S”>S</option>
<option value=“./phppage.php?action=add&id=<? echo $getproductid; ?>&size=XS”>XS</option>
</select>

hi venkat6134,
very good idea. thanks a lot man.
also thanks to guido2004, but i want to do like in link in button so i prefer venkat6134’s idea. anyway thanks to all of u.