Hi rahaiffi,
I don't think it's possible with PHP as a server-side language to do that before form submit. You would have use to use some client-side script such as javascript.
I think if you are going to use the "onclick" behavior anyway, you may give javascript a try.
You could also make the form select an onChange and make that submit/refresh the form on which you could output a button for your try.php id with the selected value.
Hence (pseudo code):
<select name="select" onChange="submit/refresh form">
and then
<?php if(isset($_POST['userselection'])){
$tryid = $_POST['userselection'];
} else {
$tryid = '';
}
?>
<input name="Form" type="button" id="Form" onclick="location='try.php?test=<? echo $tryid; ?>'" value="Form">