Hello,
I'm trying to make this work so if i press on a this button, a table inside the database change (A text change from one to another)
But it wont work? What do i do wrong?
I'm trying to make so resolved inside hk_issues in my DB change from "Accepted" to "Deny" and change resolvedc (It have enum('0', '1') inside the DB. So it should change from 0 to 1 when it change (When i press the button)Code:<?php $q = mysql_query("SELECT * FROM hk_issues"); while ($m = mysql_fetch_array($q)) { ?> <a href = "{url}/index.php?url=hk&staff&deny&id=<?php echo $m['id']; ?>">Change</a> <?php } if(isset($_GET['deny'])){ if($_GET['username'] == 'Test'){ $logtest = "INSERT INTO hk_logs (type, time, who_done) VALUES('Attempted to fire user(" . $_GET['username'] .")','". time() ."','{$_SESSION['user']['username']}')"; echo '<div class = "alert">You cannot do that</div>'; mysql_query ($logtest); } else{ $qdeny = "INSERT INTO hk_logs (type, time, who_done) VALUES('Staff Application " . $_GET['username'] ."','". time() ."','{$_SESSION['user']['username']}')"; mysql_query("UPDATE hk_issues SET resolved = 'Deny!' WHERE id = '" . $_GET['id'] . "'"); mysql_query($qdeny); echo('<div class = "alert">User text changed successfully.<meta http-equiv="refresh" content="3;url={url}/index.php?url=hk&staff"/></div>'); } } ?>
Any idea how to do this?


Reply With Quote

