include ("auth.inc.php3");?>
Update
echo $tablename;
$qr="update $tablename SET ";
$qr1=" WHERE ";
$rs=@mysql($dbname,"show fields from $tablename");
$nf=mysql_numrows($rs);
$firstset="YES";
$firstselect="YES";
$j=0;
while($j<$nf):
$tmp = mysql_result($rs,$j,"Key");
$fn = mysql_result($rs,$j,"Field");
$old="old$fn";
if ($firstset=="YES"){
$firstset ="NO";
} else {
$qr += " , ";
}
$qr += "$fn = ";
$funct="function$j";
if ($$funct):
$$funct=substr($$funct,0,strlen($$funct)-2);
echo $funct;
if ($$fn):
$qr += "$$funct('$$fn')";
else:
$qr += "$$funct()";
endif;
else:
$qr += "'$$fn'";
endif;
if ($tmp=="PRI"){
if ($firstselect=="YES"){
$firstselect ="NO";
} else {
$qr1 += " and";
}
$qr1 += " $fn = '$$old'";
}
$j++;
endwhile;
$qr= $qr + $qr1;
$rs=@mysql($dbname,"$qr");
echo "";
include ("report.inc.php3");
echo "
go on
";
?>