You could use a form -- but since this is a db maillist -- maybe you ought to explore that on one of the other php lists e.g. general.
Mark Cain ----- Original Message ----- From: "ReClMaples" <[EMAIL PROTECTED]> To: "Philip Hallstrom" <[EMAIL PROTECTED]> Cc: "PHP" <email@example.com> Sent: Wednesday, May 11, 2005 6:28 PM Subject: RE: [PHP-DB] Need some help > 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:[EMAIL PROTECTED] > 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 > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php