problems with session_destroy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • José Landoni

    problems with session_destroy


    Hi, I got a problem with session_destroy function
    I created a script but it wont work, it goes like this:

    <?php
    session_start() ;
    session_unset() ;
    session_destroy ();
    header(location :index.php);
    ?>

    I tried all means to find out but i couldnt, Id appreciate some help
    thx

    Joe

    ##-----------------------------------------------#
    Article posted from PHP Freaks NewsGroup

    Get Addicted: comp.lang.ph
    ##-----------------------------------------------##
  • R. Rajesh Jeba Anbiah

    #2
    Re: problems with session_destroy

    ilandoni_at_mon tevideo_dot_com _dot_uy@fo (José Landoni) wrote in message news:<3pSdnRijA bfCDjDdRVn_vA@g iganews.com>...[color=blue]
    > Hi, I got a problem with session_destroy function
    > I created a script but it wont work, it goes like this:
    >
    > <?php
    > session_start() ;
    > session_unset() ;
    > session_destroy ();
    > header(location :index.php);
    > ?>
    >
    > I tried all means to find out but i couldnt, Id appreciate some help[/color]

    Sorry, please be more specific. What problem? or what error? And
    what OS and what PHP version, etc...

    --
    | Just another PHP saint |
    Email: rrjanbiah-at-Y!com

    Comment

    • Brad Kent

      #3
      Re: problems with session_destroy

      a) what does your error output say?
      b) try putting 'location:index .php' in quotes

      ilandoni_at_mon tevideo_dot_com _dot_uy@fo (José Landoni) wrote in message news:<3pSdnRijA bfCDjDdRVn_vA@g iganews.com>...[color=blue]
      > Hi, I got a problem with session_destroy function
      > I created a script but it wont work, it goes like this:
      >
      > <?php
      > session_start() ;
      > session_unset() ;
      > session_destroy ();
      > header(location :index.php);
      > ?>
      >
      > I tried all means to find out but i couldnt, Id appreciate some help
      > thx
      >
      > Joe
      >
      >
      > ##-----------------------------------------------##
      > Article posted from PHP Freaks NewsGroups
      > http://www.phpfreaks.com/newsgroups
      > Get Addicted: comp.lang.php
      > ##-----------------------------------------------##[/color]

      Comment

      • Matthias Esken

        #4
        Re: problems with session_destroy

        José Landoni schrieb:
        [color=blue]
        > header(location :index.php);[/color]

        You need a full domain qualifier and the correct Syntax:

        header('Locatio n: http://www.example.com/index.php');
        exit;

        Regards,
        Matthias

        Comment

        Working...