Hvorfor virker min kode ikke??
Det der ar galt er, at den ikke vil oprette brugeren i databasen med den advarsel brugeren har fået....!
hvorfor???
Kode:
<?
if($_GET['gem'] == 'yes'){
include("../../data/database.php");
$db = "SELECT * FROM user_worring WHERE userid = '$_POST[user]'";
$db_pass = mysql_query($db);
while ($hent1 = mysql_fetch_assoc($db_pass)) {
if($hent1['nr'] < 1){
include("../../data/database.php");
$db = "SELECT id FROM user WHERE username = '$_POST[user]'";
$db_pass = mysql_query($db);
while ($hent = mysql_fetch_assoc($db_pass)) {
$id = $hent['id'];
$worring = '1';
mysql_query("INSERT INTO user_worring SET nr = '$worring' WHERE `userid` LIKE '$id'");
print $_POST['user'] . "Har fået 1 advarsel";
}
} else {
print "<font color=#ff0000>Brugeren har fået 1 advarsel!!!</font>";
}
}
}
?>
//Heymann