How to add total price in a cart php -


Hello, I'm currently making a project for assignments to create a website that sells games, so far everything is fine On the issue of linking the shopping cart's totals. Below is a PHP part of the cart file that shows every game and puts the price of the game every time it carts.

The only value I get is 0.

I query this php file at the top of this file

   Query ($ query); $ numrow = $ results- & gt; num_rows; ? & Gt;   

I'm not sure why this code is not working:

  $ i = 0; While ($ count & lt; $ numrow) {$ i = $ gamePrice * $ quantity; } echo $ i;   

Cart.php

  & lt ;? Php $ count = 0; While ($ count & lt; $ numrow) {$ row = $ result - & gt; Fetch_assoc (); Extract ($ line); Echo "& lt; div & gt;"; Echo "& lt; div class = 'recommended_games' & gt;"; Echo "& lt; img src = 'picture />. GameIMG.' '/'> "; Echo" & lt; / div> "echo" div class = "price_tag"> gt; echo '& lt; div class = "price_tag" name = "price" method = "POST" & gt; one pound.  'echo' 

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -