karker Posted June 2, 2011 Share Posted June 2, 2011 $sayi = $_GET['islem']+1; $url = '24.php?islem='.$sayi.''; function redirect($url){ if (!headers_sent()){ header('Location: '.$url); exit; }else{ echo '<script type="text/javascript">'; echo 'window.location.href="'.$url.'";'; echo '</script>'; echo '<noscript>'; echo '<meta http-equiv="refresh" content="1;url='.$url.'" />'; echo '</noscript>'; exit; } } redirect($url); Why do you think the routing does not work ?? Quote Link to comment https://forums.phpfreaks.com/topic/238237-header/ Share on other sites More sharing options...
mikesta707 Posted June 2, 2011 Share Posted June 2, 2011 It could be one of many things. What exactly is happening? Is your condition true or false? Just posting code and asking why it doesn't work won't get you an answer. What does url have in it? Try echoing it to see it has the value you expect Quote Link to comment https://forums.phpfreaks.com/topic/238237-header/#findComment-1224308 Share on other sites More sharing options...
karker Posted June 2, 2011 Author Share Posted June 2, 2011 it is 24.php everything codes here function redirect($url){ if (!headers_sent()){ header('Location: '.$url); exit; }else{ echo '<script type="text/javascript">'; echo 'window.location.href="'.$url.'";'; echo '</script>'; echo '<noscript>'; echo '<meta http-equiv="refresh" content="1;url='.$url.'" />'; echo '</noscript>'; exit; } } redirect($url); Why do you think the routing does not work ?? Quote Link to comment https://forums.phpfreaks.com/topic/238237-header/#findComment-1224311 Share on other sites More sharing options...
teynon Posted June 2, 2011 Share Posted June 2, 2011 You have stated what you want it to do. The "Expected Result". Please explain what is doing instead. The "Unexpected Result". Quote Link to comment https://forums.phpfreaks.com/topic/238237-header/#findComment-1224312 Share on other sites More sharing options...
Maq Posted June 2, 2011 Share Posted June 2, 2011 You're going to get answers if you don't provide information. Use code tags. You did it in your first post, so stop being lazy and add them in the future. What is happening?! Just posting code and asking why it doesn't work won't get you an answer. No surprise there, they have basically been doing this since they joined. Quote Link to comment https://forums.phpfreaks.com/topic/238237-header/#findComment-1224313 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.