//--------------------------------------// Insert Transaction details into DB.//--------------------------------------$qry = "INSERT into dec25 VALUES ( \"\", \"$timestamp\", \"$category\", \"$subcategory\", \"$vender\", \"$description\", \"$income\", \"$expense\", \"100.00\", \"$payment_type\", \"$recurring\" ) ";$result = mysql_query($qry,$db);///////////////////////////////////////////// Get the total income and expenses// from the rows///////////////////////////////////////////$query = "SELECT * FROM dec25 ORDER BY id desc";$result = mysql_db_query($dbname, $query); while($row = mysql_fetch_array($result)) { $tot_income = $row['income']; $tot_expense = $row['expense']; }