I'm trying to get the total for each product and add them for a Grand Total to list outside the loop or only echo once I can do the addition but it will echo 5 time in the loop.
How would I go about doing this?
Thanks in advance for your help.
Code: <?php
$cart2="SELECT * FROM products WHERE pro_indid='glass'";
$res2 = mysql_query($cart2) or die('Error, query failed 2');
while($cr2=mysql_fetch_array($res2)){
$totrow=$cr2["total"];
///the $totrow will echo below 5 time each price in database 5.67 which the total should be 28.35 //
echo $totrow;
}
///Output of total would be $28.35
?>
The output I'm looking for would be like so
5.67
5.67
5.67
5.67
5.67
GrandTotal:28.35
Cron Job and Output
I have php codes running under a cron job.But everytime i output (echo) , it comes out as complete text:THe php script is setup to output some stuff so they are sent to the cron email...but all the
How to disable direct access to a file
Suppose I've 2 Files. 1.php & 2.php I don't want anybody to access 2.php directly from browser. Eg: http://localhost/2.php but I want 2.php show up in 1.php like:Line number On/Off |
Google Wave
So... has anyone used it yet? Is it any good?http://wave.google.com/help/wave/about.html#video
date function help
i need help with date functionCode: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Solution Manager BPR
Does the SolMan-BPR-ARIS-Integration (http://www.ids-scheer.com/en/ARIS/ARIS_Platform/ARIS_Business_Architect_for_SAP/3743.html ) use an interface open to the public? If yes, were can I finde some
Ten Operator Syntax
Hi Guys,I can't figure out why i am getting a parse error with this basic ten op code:$prodTH = ($prodIA == "Y") ? "<img src=\"" . amazon_display_thumbnail($prodID)
User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the moment.I have a phpbb3 forum and have a custom registration form. the password is hashed usering the
Connecion issue
Hi,For some reason, I keep getting this error when trying to connect:Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on...Warning: mysql_select_db()
Word filter problem
Hello,im trying to make a filter for words inputted in to my website but i want to store the swear word and the replacement for that word in a mysql db i have developed the code
How to ... (FAQs)
... get e-mail notifications