In primis c'è un errore... il tuo tag "input" non è dentro i tag <td></td>

Inoltre quello che chiedi si può fare senza disturbare javascript, basta mettere il tuo input+pulsante dentro un proprio <form></form>, in questo modo

Codice PHP:
$database=mysql_select_db("moto",$link);
$sql="select * from allievo where all_nome is not null";

$tutto=mysql_query($sql,$link);
echo 
"<table border=1 align=center width=100%>";
while (
$valori=mysql_fetch_array($tutto)) {
    echo 
"<form action='xxx.php' method='post'>";
    echo 
"<tr>";
    for (
$i=0;$imysql_num_fields($tutto);$i++) {
        echo 
"<td>$valori[1]</td>";
        
    }
    echo(<
td>"<input type='text' name='sig' value='".$valori['id']."'></td>");
    echo(
"<td><input type='submit' value='Modifica...' value='".$valori[0]."'></td>");
    echo 
"</tr>";
    echo 
"</form>";
}
echo 
"</table>"