Jump to content

variable problem


m118

Recommended Posts

I set up e-commence system for our company, there is a problem in this project. When I try to add the product in the cart, it can not do the Extended Price over one thousand dollars. If the Extended Price is lower than one thousand dollars, it is working. I do not know how to fix this problem . Please tell me , thank you very much

The link is http://www.ptiimaging.ca/po.php?wd=1551

This is the code.

 

<?php

include("connection.php");

$sessid=session_id();

$select="select * from carttemp where sess= '$sessid'";


$result2=mysql_query($select, $connection) or die (mysql_error());

$rows=mysql_num_rows($result2);

?>
<p align="center"> You currently have <?php echo "$rows "; ?>product(s) in your cart.</p> <br>
<div class="tabbanner"><strong>View the Shopping cart </strong></div>
<table class="tableinsert">
<tr>

<th>Quantity</th>

<th>Item Name</th>
<th>Price Each</th>
<th>Extended Price</th>
<th></th>
<th></th>
<th></th>
</tr>
<?php
while ($row=mysql_fetch_array($result2)) {
extract($row);
$price;

$quan;

$extprice=number_format($price*$quan,2);

?>

<tr>
<td>
<form action="change1.php" method="post">
<input type="hidden" name="prodnum" value="<?php echo $row['prodnum']; ?>"/>
<input type="hidden" name="sessid" value="<?php echo $row['sess']; ?>" />
<input type="hidden" name="hidden" value="<?php echo $row['hidden']; ?>"/>
<input type="text" name="qty" size="5" value="<?php echo $row['quan']; ?>"/>
</td>


<td><?php echo $row['prodnum']; ?></td>
<td><?php echo $row['price']; ?></td>
<td><?php echo $extprice ; ?></td>


<td>
<input type="submit" name="submit" value="change Qty" />


</form>



</td>

<td>

<form action="xid.php" method="post">
<input type="hidden" name="prodnum" value="<?php echo $row['prodnum']; ?>"/>
<input type="hidden" name="sessid" value="<?php echo $row['sess']; ?>" />
<input type="hidden" name="hidden" value="<?php echo $row['hidden']; ?>"
<input type="hidden" name="qty" size="2" value="<?php echo $row['quan']; ?>" />

<input type="submit" value="Delete Item" name="submit" />
</form>
</td>
</tr>




<?php
$total=$extprice+$total;
};


?>

Link to comment
https://forums.phpfreaks.com/topic/225110-variable-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.