iSpeedDevil! Posted September 15, 2008 Share Posted September 15, 2008 Hello there, i just recently bought this half-done php text-based mafia game script for about 90$, i thought i were experienced enough to could script the rest done myself, but i was wrong xD... so thats why im asking for help here. The "error"/problem here is that everytime i press that submit button, it just goes back to the delete_user.php page, and nothing will happen! <?php include "header2.php"; include "_menu.php"; if ($melding) { echo "<div class=\"window\">"; echo "<div class=\"mainTitle\">Delete hun</div>"; echo "<div class=\"mainText\">"; echo "$melding"; echo "</div></div>"; } else { ?> <div class="window"> <div class="mainTitle">Delete user? <?php echo "$d_user"; ?></div> <div class="mainText"> <? if ($moderator > 2) { if (!$type) { ?> Are you sure you wanna delete <?php echo "$d_user"; ?>? <br/> <form action=delete_user.php method=post> <input type=radio name=confirm value=yes> Yes <input type=radio name=confirm value=no> No <input type=hidden name=type value=delete><input type=hidden name=user value=<?php echo "$d_user"; ?>><br/><br/> <input type=submit value=Yes!> </form> <?php } elseif ($type == "delete") { $confirm = $_POST['confirm']; if ($confirm == "no") { echo "<META http-equiv=refresh content=\"0;url=adminusers.php\">"; } elseif ($confirm == "yes") { $sql = "DELETE FROM users WHERE username=\"$d_user\""; if (mysql_query($sql)) { echo "The user $d_user is Successfully Deleted!"; } } } } else { echo "You are not allowed to see this area!"; } ?> </div> </div> <? } include "footer.php"; ?> can anyone push me off in the right direction? ^^ Thank You! ~iSpeedDevil! Link to comment https://forums.phpfreaks.com/topic/124352-need-help-with-delete-user-script/ Share on other sites More sharing options...
iSpeedDevil! Posted September 15, 2008 Author Share Posted September 15, 2008 too hard for you all? ??? Link to comment https://forums.phpfreaks.com/topic/124352-need-help-with-delete-user-script/#findComment-642255 Share on other sites More sharing options...
PFMaBiSmAd Posted September 15, 2008 Share Posted September 15, 2008 The code is dependent on register_globals being on. You would need to rewrite it to correct that problem and soon because register_globals have been completely removed in upcoming php6. Link to comment https://forums.phpfreaks.com/topic/124352-need-help-with-delete-user-script/#findComment-642306 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.