RE: [PHP-DB] Need some help

From: Date: Wed, 11 May 2005 22:28:40 +0000
Subject: RE: [PHP-DB] Need some help
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-39411@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. Thanks -rich -----Original Message----- From: Philip Hallstrom [mailto:php@philip.pjkh.com] Sent: Wednesday, May 11, 2005 4:36 PM To: ReClMaples Cc: PHP Subject: Re: [PHP-DB] Need some help > I am having an issue with displaying a variable from another php script. > Can you help please? > > Here is the code that I'm using: > > <?php > > $item_ttlprice = $_POST[$ttl_price]; This should at the very least be: $item_ttlprice = $_POST[ttl_price]; // remove the last dolalr sign Also, if youre HTML form's action is GET then you should replace POST with GET... > ?> > <html> > <body> > Your price is: $ > <?php > echo $item_ttlprice; > ?> > <body> > </html> > > pretty simple I would think but I can't figure out what I'm doing wrong. > The above is the new script. Below is the script that the $ttl_price is > coming from: > > td align=center>\$ $item_price <br></td> > <td align=center>$item_qty <br></td> > <td align=center>\$ $total_price</td> > <td align=center><a > href=\"removefromcart.php?id=$id\">remove</a></td> > </tr>"; > $ttl_price = $ttl_price + $total_price; > > > Can anyone tell me what I'm doing wrong? > > I have tried changing this part: > > <?php > > $item_ttlprice = $_POST[$ttl_price]; > ?> > > to $item_ttlprice = $_GET[ttl_price]; > > to $item_ttlprice = $_POST['$ttl_price']; > > nothing seems to work. > > > Thanks for your help > -Rich >

« previous php.db (#39411) next »