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 only on some of them. Grrr.
>
After reading this again, the function does not use $_POST at all.
here it is again.
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);
$html_template = str_replace('{title}', $GLOBALS['title'],
$html_template);
$html_template = str_replace('{description}',
$GLOBALS['descrip'], $html_template);
$html_template = str_replace('{price}', $GLOBALS['price'],
$html_template);
$item_file_name = $GLOBALS['root_dir'] . "/" . $GLOBALS['dir'] .
"/item.html";
$item_fh = fopen($item_file_name, 'x+');
fwrite($item_fh, $html_template);
} else {
$GLOBALS['errors'] .= "item.html template does not exsit";
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php