codice:
$type =0; //variabile
echo'<table border="1" width="70%">
<tr>
.....
<form method='post' action='Destinazione.php'>
<input type='hidden' name='cod' value='$col[0]'>
<input type='hidden' name='var' value='0'>
<input type='hidden' name='type' value='$type'>
<input type='submit' name='nome' value='$col[1]'></input></form>";
echo "</table>";
i valori arrivano tutti correttamente nella pagina di destinazione
codice:
<script>
function Indietro(n){
alert(typeof(n));
}
/*if(n==0)
location.href='ConcertiPast.php';
if(n==1)
location.href='ConcertiPres.php';
if(n==2)
location.href)='ConcertiFut.php';
}*/
</script>
...
$type=$_POST['type']; //riceve il valore
echo"<h10>'$type'</h10>"; //stampa il valore ricevuto ed è corretto
echo"<br><input type='button' value='Indietro' onclick='Indietro($type)'></input> //passa il valore alla funzione