Jump to content

header()


karker

Recommended Posts

$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 ??

Link to comment
https://forums.phpfreaks.com/topic/238237-header/
Share on other sites

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 ??

Link to comment
https://forums.phpfreaks.com/topic/238237-header/#findComment-1224311
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/238237-header/#findComment-1224313
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.