// If uploaded has been set to 1, we need to change the uploaded picture file
// and the picture field in the database with the user's number
if ($uploaded) {
$newpicname = "{$config['avatarurl']}/$Uid$pictype";
copy($Picturefile, "$newpicname");
@unlink($Picturefile);
$query = "
UPDATE {$config['tbprefix']}Users
SET U_Picture='" .addslashes($newpicname)."'
WHERE U_Number='$Uid'
";
$dbh->do_query($query,__LINE__,__FILE__);
}