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
Problem with HTML form
Hello,I made a HTML form with some fields and check box.Everything works fine except when i receive the email, only fields appear in the email not the content of the check box.I have attached the
Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5... function getTreeWithChildren() { $category_id = $this->fields['id']; $parent_id =
convert static html data into dynamic
hi alli need to convert a website which has static above 2000 articles into dynamic and add that data into database. one solution i know is copy and paste it manually.is there any other formula or
Multi Dimensional Array Append
Hi Guys I have a function that returns a multidimentional array eg $result = function(param)echo $result[0][1]." ".$result[1][1]but I want to call the function 4 diffrent times and append to
Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the same problem) into the mail form, the email that arrives is all gibberish. For example this should
How to add advertisment on top of videos
Hello,I was told that i should find the answer for this problem in this forums.I searched a lot but i couldnt find the solution .What i need to do is to add ads on top of the videos i have
Business Health Check
Hello I need to create an online business health check for a client it will be multiple choice and about 50 questions but the client has requested that the output/results of the health check needs to
Form always sends to error page...
Hello,Any help will be greatly appreciated. I am having trouble getting multiple fields to be required, and with the if multiple errors section. I think that's where the problem is. When I click
Login script (probably a simple error)
dbConfig.phpCode: <?// Replace the variable values below// with your specific database information.$host = "localhost";$user = "username";$pass = "password";$db
highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm trying to take individual search terms that are being $_POSTed and highlighting them in the search