RE: [PHP] Confused - $GLOBALS

2004-12-10 Thread Richard Lynch
I always forget, because they changed it around on POST/GLOBALS/etc at some point, but only on some of them. Grrr. The built-in arrays with names beginning $_ are superglobals, i.e. always global anyway. The only other superglobal is $GLOBALS, which is a anming exception because it

RE: [PHP] Confused - $GLOBALS

2004-12-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 09 December 2004 20:41, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; No, he doesn't. in the function that uses $_POST.

[PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my question is, does PHP in

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Belay that...the $GLOBALS array has existed since PHP3 -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Richard Lynch
My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but only on some of them. Grrr. -- Like Music?

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? in the function that uses $_POST. Or is $_POST always global anyway? No. I always

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 15:39 -0500, Roger Spears wrote: Danny Brow wrote: On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:48, Danny Brow wrote: On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? No in the function that uses

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: snip function html_template() { global $item_pics1; if (file_exists('item.html')) { print This is item_pics1 . $item_pics1; $html_template = $GLOBALS['html_template']; $html_template = str_replace('{item_pictures}', $item_pics1, $html_template);

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:52, Danny Brow wrote: OK, you never said what your problem was except to say everything works but the str_replace item_pics1. Did you check $GLOBALS['errors'] after calling this function? function html_template() { global $item_pics1; if

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Fri, 2004-12-10 at 05:52 +0800, Jason Wong wrote: On Friday 10 December 2004 04:52, Danny Brow wrote: OK, you never said what your problem was except to say everything works but the str_replace item_pics1. Did you check $GLOBALS['errors'] after calling this function? No but I'm doing