rory walsh <mailto:[EMAIL PROTECTED]>
    on Wednesday, March 02, 2005 2:38 PM said:

> Is it to do with the link:
> <a href=\"index.php?action=edit\">
> does this call the script again, just as an action="script.php" in a
> form would? Cheers for the help on this.

Yes it does. But it doesn't erase the session values (it seems that's
what you think is happening?).

I think what you need to do (I do this sometimes too) is start from
scratch and create a very basic test page that works as expected. Then
slowly add in the features you want. It'll give you a much greater
understanding of how things work and where you're going wrong. Sure it's
tedious but it'll help you in the long run.

Here is a good base to start with:

<?php

        session_start();

        if(isset($_GET['var']) && !empty($_GET['var']))
        {
                $_SESSION['myVariable'] = "from form";
        }
        else
        {
                $_SESSION['myVariable'] = "direct request";
        }

        print_r($_SESSION);

?>


hth,
Chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to