Re: Error Message - Need help troubleshooting
| From: | Rick Dwyer | Date: | Tue, 02 Mar 2010 14:49:53 +0000 |
| Subject: | Re: Error Message - Need help troubleshooting | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302480@lists.php.net to get a copy of this message | ||
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