CallumJohnson
05-03-2009, 05:40 PM
if ($username != 'mic4'){
if ($info->lastcrime > time()){
$timeleft = $info->lastcrime - time();
echo "<font color=\"white\"><center><br /><br /><strong>"
."$timeleft seconds before you can do another cime!</strong><br /><br /></center>";
if($session->isAdmin()){ //New bit
echo '<center><input name="resetadmin" id="resetadmin" type="submit" value="reset admin" /></center>'; }
//Function to show link to admin centre
exit(); }
}
Thats the submit button (its in the $session->admin if statement), when clicked i want it to execute this code only:
//New bit
if (strip_tags($_POST['resetadmin'])){
$reset_admin = strip_tags($_POST['resetadmin']);
mysql_query("UPDATE users SET lastcrime='0', WHERE username='$username'");
};//end new bit
I can't get it to execute the above code, a solution would be apreciated :)
I'm sure its me having a mental block :P
if ($info->lastcrime > time()){
$timeleft = $info->lastcrime - time();
echo "<font color=\"white\"><center><br /><br /><strong>"
."$timeleft seconds before you can do another cime!</strong><br /><br /></center>";
if($session->isAdmin()){ //New bit
echo '<center><input name="resetadmin" id="resetadmin" type="submit" value="reset admin" /></center>'; }
//Function to show link to admin centre
exit(); }
}
Thats the submit button (its in the $session->admin if statement), when clicked i want it to execute this code only:
//New bit
if (strip_tags($_POST['resetadmin'])){
$reset_admin = strip_tags($_POST['resetadmin']);
mysql_query("UPDATE users SET lastcrime='0', WHERE username='$username'");
};//end new bit
I can't get it to execute the above code, a solution would be apreciated :)
I'm sure its me having a mental block :P