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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.