|
Since I don't know what is before the snipet you posted it's hard to tell what's going on. But try this:
<?php if(isset($_POST['Submit'])){
$query=mysql_query("UPDATE tra_users SET level='1' WHERE username='$username'")or die(mysql_error);
$_SESSION[level] = '1'; //or whatever your session variable is.
}?>
Since I don't know what follows I can't see if you have stuff following it. And how the page is going to refresh itself.
The session change won't happen unless you've not printed any html etc to the browser. But it should happen on refresh.
|