RE: [PHP-DB] Need some help
| From: | Murray @ PlanetThoughtful | Date: | Thu, 12 May 2005 04:23:37 +0000 |
| Subject: | RE: [PHP-DB] Need some help | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39413@lists.php.net to get a copy of this message | ||
> Sorry but this isn't working. The variable $ttl_price is a calculation in
> my first script. It stores the value of $Total_Price for all items. I am
> trying to pass that to a new page. It isn't a form that I'm working with,
> do I need to make it a form? I would greatly appreciate any help you
> could
> offer.
The $_POST[] superglobal is only available to a page directly following a
page with a form on it, when the form's method set to 'POST'.
Id $ttl_price a single value or an array?
If you are not using a form, you could possibly pass the value on the query
string, then use $_GET[] in your target page to retrieve the value from the
query string. This doesn't require the presence of a form on your
originating page.
Otherwise, you could also use sessions to put the value into a session
cookie and then retrieve it from the target page, using the $_SESSION
superglobal.
How are you moving from the page in which the calculation is done to the
page in which you need the calculation? Ie, do you click on a button, a
link, do you redirect to the page etc?
Much warmth,
Murray