In the script that you posted, the "else" part (i.e. when there is posted data) uses variables that haven't been set (they are only set in the non-posted data part).
Each time someone accesses your page, your script starts from the beginning, so this code:
$i2=0;
while ( $i2 < $Brg_Rows ){
$Save_Code=$_POST['phone'.$i2] ;
$DB_Code=mysql_result($Brg_Query,$i2,"phone"); Is using $Brg_Rows and $Brg_Query which haven't been set. Also mysql_result
retrieves the value from a result set, it does not do any updates. You need to perform some INSERT, UPDATE or REPLACE sql statements.