-
More PHP Help!
Ok i want it so when my userlevel 1 refresh's the page it set's there health to 999, ive done the php and query but how do i go about doing the refresh bit?
PHP Code:
<?php if($fetch->userlevel == "1"){
echo"mysql_query("UPDATE users SET health='999' WHERE username='$username");";} ?>
What i need is when they refresh the page it does that, thanks;)
-
-
[php]<?php if($fetch->userlevel == "4"){
echo"<meta http-equiv="refresh">mysql_query("UPDATE users SET health='999' WHERE username=$username";} ?> [/php
?
-
PHP Code:
<?php
if($fetch->userlevel == "1")
{
mysql_query("UPDATE `users` SET `health` = '999' WHERE `username` = '$username'");
/* only do this if no other data is outputted to the browser above this line */
header("location: page.php");
/* do this if data HAS been outputted */
echo('<meta http-equiv="refresh" content="0; URL=page.php">');
}
?>