Need some help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux