On Tue, 2010-03-02 at 09:35 -0500, Rick Dwyer wrote:
> On Mar 2, 2010, at 8:48 AM, Ashley Sheridan wrote:
> > How is $item_id created? You've not shown that in your PHP script
> > examples.
> // parse item id from the url
> $item_id=substr($thispage, -9);
> $item_id=substr($item_id, 0, 5);
> $_SESSION['item_id'] = "$item_id";
> The above is where item_id is created and added to a session.
> The important thing is that this error never showed up before until I
> var oss_itemid = "<?php echo $item_id; ?>";
> var loadOSS = window.open("http://www.myurl/myfile.php?iid=" +
> oss_itemid, "",
> When I was testing initially, I had removed the variable above in the
> link with a hard coded value and I never received this error. Only
> when I made it dynamic did this error appear.
> Thanks for any help.
above are both on the same page. The only way I can see your problem
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.
Try changing the line to
var oss_itemid = "<?php echo $_SESSION['item_id']; ?>";
and see if that gives you the error.