<?php

include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
if ($cAdminLevel < 2)
{
    //kick out non-moderators...
    header("Location: topics.php?groupid=$groupid");
    exit;
}
$query = "UPDATE $forumtable SET strAvatar = '$avatar' WHERE strName = '$userid'";

mysql_query( $query, $link )
or die ( "Could not update in \"$forumtable\" table: "
.mysql_error() );


$query = "UPDATE $userstable SET strAvatar = '$avatar' WHERE strName = '$userid'";

mysql_query( $query, $link )
or die ( "Could not update in \"$userstable\" table: ".mysql_error() );

header("Location: profile.php?userid=$userid");
exit;

?>