<?php

   $idu=$id;

    $a_usrparams = find_post("usr_");
    $usrparams = serialize($a_usrparams);     
    
    foreach ($a_usrparams as $k => $v){
    	
    	#echo $k. " => ". $v."<br/>";
    	$a_usrparams[$k] = myencodeTxt($v);
        	
    	
    }
    extract($a_usrparams);
        
    $sql = "UPDATE t_utenti SET username='$usr_username', nome='$usr_nome', cognome='$usr_cognome', email='$usr_email' WHERE id_utenti=$idu";
    $mydb->ExecSql($sql);

    $sql = "UPDATE t_utenti SET telefono='$usr_telefono', rs='$usr_azienda' WHERE id_utenti=$idu";
    $mydb->ExecSql($sql);

    if(isset($usr_level))
        {
            $sql = "UPDATE t_utenti SET level='$usr_level' WHERE id_utenti=$idu";
            $mydb->ExecSql($sql);
        }
    

