insei Posted January 21, 2010 Share Posted January 21, 2010 I have made a ladder based league system for a game called tekken, where users can log in and report games they just have played, and their opponent has to accept loss in order for the match to be confirmed. http://www.xgs-gaming.com/ladder_system/ For the membership system and among other things i use a different file for form posts, and then redirect them to the index file using <?php echo "<meta http-equiv='refresh' content='0;index.php'>"; ?> inside my php code. I understand that this is not a good thing, becouse things might not work as intended. I noticed that my ladder module wont work on internet explorer, so im curious if there is another way of doing this. I tried to use php header function but didnt work. I want to jump after i execute some codes, becouse of working with forms on another file so that they wont get reposted if someone refreshes the page. i tried to use: header('Location: index.php'); it wored on the pages where there was no html code, but if there were i got this error code: Warning: Cannot modify header information - headers already sent by (output started at /home/xgsgagbg/public_html/ladder_system/index.php:18) in /home/xgsgagbg/public_html/ladder_system/index.php on line 91 how do i deal with this? Link to comment https://forums.phpfreaks.com/topic/189343-page-redirection/ Share on other sites More sharing options...
schilly Posted January 21, 2010 Share Posted January 21, 2010 header() can only be used if there is no output to the browser yet. Why do you need to output html if you are just going to redirect them? Link to comment https://forums.phpfreaks.com/topic/189343-page-redirection/#findComment-999544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.