Sono riuscito a risolvere uno dei 2 problemi che avevo posto.

Per poter resettare l'ID ogni volta che si effettua una ricerca ho sostituito questo codice

Codice PHP:
while($row=mysql_fetch_array($sql)){

    echo 
"<tr>";
    echo 
"<td width='auto' bgcolor=”#FF0000 ″>" """[b]"  $row[0] . """<b/>""</td>";
    echo 
"<td width='auto'>" "" $row[1] . "" "</td>";
    echo 
"<td width='auto'>""</td>";
    echo 
"<td width='auto'>" """[i]" $row[2] . "<i/>""" "</td>";     
    echo 
"<td width='auto'>" """[i]" $row[3] . "<i/>""" "</td>";
    echo 
"</tr>";
    

con questo

Codice PHP:
 $i 0; while($row=mysql_fetch_array($sql)){
        
$i++;
        echo 
"<tr>";
        echo 
"<td width='auto' bgcolor=”#FF0000 ″>" """[b]"  $i """<b/>""</td>";
        echo 
"<td width='auto'>" "" $row[1] . "" "</td>";
        echo 
"<td width='auto'>""</td>";
        echo 
"<td width='auto'>" """[i]" $row[2] . "<i/>""" "</td>";     
        echo 
"<td width='auto'>" """[i]" $row[3] . "<i/>""" "</td>";
        echo 
"</tr>";


Ma non sono ancora riuscito a risolvere questo problema:
http://stackoverflow.com/questions/3...led-from-mysql