PHP expert |
|
oke, het werkt nu half
heb nu dit
<?php
if($_POST['warnings'] =="1") {
$warnings = $admin['warning'];
$warnings++;
}elseif($_POST['warnings'] =="2") {
$warnings = $admin['warning'];
$warnings--;
}
?>
<?php if($_POST['warnings'] =="1") { $warnings = $admin['warning']; $warnings++; }elseif($_POST['warnings'] =="2") { $warnings = $admin['warning']; $warnings--; } ?>
dit is voor updaten
<?php
if($admin['warning'] == 3) {
echo "<tr><td colspan='2'>$_GET[user]'s profile has been updated<br />This account has been banned</td></tr>";
$update = mysql_query("UPDATE users set rank = '0', subtitle = '$subtitle', msn = '$msn',
email = '$email', homepage = '$homepage', location = '$location', warning = '$warnings' WHERE username = '".$_GET['user']."'");
}else{
echo "<tr><td colspan='2'>$_GET[user]'s profile has been updated</td></tr>";
$update = mysql_query("UPDATE users set rank = '$rank', subtitle = '$subtitle', msn = '$msn',
email = '$email', homepage = '$homepage', location = '$location', warning = '$warnings' WHERE username = '".$_GET['user']."'");
}
?>
<?php if($admin['warning'] == 3) { echo "<tr><td colspan='2'>$_GET[user]'s profile has been updated<br />This account has been banned</td></tr>"; $update = mysql_query("UPDATE users set rank = '0', subtitle = '$subtitle', msn = '$msn', email = '$email', homepage = '$homepage', location = '$location', warning = '$warnings' WHERE username = '".$_GET['user']."'"); }else{ echo "<tr><td colspan='2'>$_GET[user]'s profile has been updated</td></tr>"; $update = mysql_query("UPDATE users set rank = '$rank', subtitle = '$subtitle', msn = '$msn', email = '$email', homepage = '$homepage', location = '$location', warning = '$warnings' WHERE username = '".$_GET['user']."'"); } ?>
alleen als er 0 staat update hij goed naar 1, maar van 1 naar 2 warnings doet hij niet en als ik van 1 naar 0 doe dan komt er helemaal niks te staan terwijl de default van mijn kolom wel op 0 staat (hij update dus wel terug )
samenvatting
hij update van 0 naar 1 en van 1 naar 0 maar niet van 1 naar 2 (warnings) |