run the following line of code in your page.  This will help you not only
with this experience but for a long time to come in the future:

phpinfo();

BTW, I suspect that your problem is that the variable is

$_POST['ttl_price'];

and not

$_POST[$ttl_price];

You will see that in the output of phpinfo();

Mark Cain


----- Original Message -----
From: "ReClMaples" <[EMAIL PROTECTED]>
To: "PHP" <php-db@lists.php.net>
Sent: Wednesday, May 11, 2005 3:14 PM
Subject: [PHP-DB] Need some help


> Hello all,
>
>    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];
> ?>
> <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

Reply via email to