Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Input::server('HTTP_REFERER') empty
  • Hi guys! I have a controller that only authenticated users have access, if a user not logged on and tries to access the controller redirects them to the login page. on the login page, after successful login i like to send the user back to there referrered page. For some reason I can't access the Input::server('HTTP_REFERER') in the login page it seems always empty. This problem seems to be happening when you use Output::redirect(), the Input::server('HTTP_REFERER') is available when I goto the login page from a link. Is there a way to inject HTTP_REFERER variable to the header before calling the Output::redirect(); ? Many thanks.
  • I would love to hear from someone else is your idea about Input::server('HTTP_REFERER') possible, but at the moment you can do like I do: Controller_SignUp:
    Session::set_flash( 'notification', 'You have been successfully signed-up! Thanks...' );
    Session::set_flash( 'location', 'sign-in' );
    
    $this->response->redirect( 'notification' );
    

    View of Controller_Notification:
    <?php
    
     echo '<p class="bold">' . Session::get_flash( 'notification' ) . '</p>';
     echo '<br /><p><a href="' . Session::get_flash( 'location' ) . '">Redirecting now...</a> Press Alt + F4 for a quick IQ test!</p>';
    
    ?>
    
    [removed]
     setTimeout( function() {
    
      [removed].replace( '<?php echo Session::get_flash( 'location' ); ?>' );
    
     }, 1000 * 3 );
    [removed]
    
  • I feel bad about this forum engine... it rapes the code. Anyway, I meant there a JScript and s-c-r-i-p-t and w-i-n-d-o-w-.-l-o-c-a-t-i-o-n.
  • Raitis Stengrevics wrote on Saturday 21st of May 2011:
    I feel bad about this forum engine... it rapes the code. Anyway, I meant there a JScript and s-c-r-i-p-t and w-i-n-d-o-w-.-l-o-c-a-t-i-o-n.

    as for now just use http://scrp.at/ :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion