Hi, i've been working on this for the whole day and still cant find the solution. I wanted to calculate the total for 1 column. but i am not sure how the codes work. This is the situation i am in:
As you can see from the image, I wrote a code to calculate Qty. and display its total in the Total column. And now I am suppose to write another code to calculate the column's total and display it in Total Price.
I have a php file extension name cashier.php and the calculation is done in updatecashier.php.
Code in cashier.php
button to submit query, once click will link to the updatecashier.php to calculate the total. And display it back in cashier.php in the Total Price column.
<input type="submit" name="calculate" value="Calculate Total" />
<?php echo $_SESSION['priceTotal']; ?>
then in updatecashier.php
note that xxx is problem which i am not sure what i am missing either in cashier.php or updatecashier.php
if(isset($_POST['calculate'])){
$_SESSION['priceTotal'] = count($_SESSION['xxx']);
count($_SESSION['xxx']);
}
header("Location: http://localhost/cashier.php");
I am really stuck in this situation and hope sum 1 could help me solve this. thanks in advance