PHP help

Discussion in 'Mobile Web Development' started by justinede, May 1, 2008.

  1. justinede

    justinede Member

    Joined:
    Dec 24, 2007
    Messages:
    843
    Likes Received:
    1
    Device:
    iPhone 3GS (Black)
    for some reason on my ipod

    HTML:
    <?
    session_start();
    if(!session_is_registered(myusername)){
    header("location:index.php");
    }
    ?>
    dosnt work. But if i go to the protected page in firefox is sends me to index.php.??? anyone know whats up?

    EDIT: Never mind i got it to work.
  2. optimo

    optimo New Member

    Joined:
    Sep 28, 2007
    Messages:
    535
    Likes Received:
    17
    header requires a full path perhaps, try

    header("Location: http://domain.com/path/index.php");

Share This Page