On Mar 2, 2010, at 9:35 AM, Ashley Sheridan wrote:

I'm assuming then that both the Javascript an the PHP code you have above are both on the same page. The only way I can see your problem occurring would be if your javascript part was on a different page and you were attempting to output the $item_id. If PHP could not find a variable with that name, it may be reverting to using the item_id value found in $_SESSION, which would give you the error you're seeing.


Yes this is the case.

However, what you said brings up a point if interest. The page that the link is bringing up contains the following:

        if ($_GET["iid"]=='') {
        $item_id = ($_SESSION["item_id"]);
        }
        else
        {
        $item_id = $_GET["iid"];
        }

This code determines if the user is getting there from the initial link and if so, sets the variable item_id to the value passed in the URL. Again however, this was not returning errors when the link was hardcoded with a value in place of item_id.

--Rick


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

Reply via email to