Checks for empty inputs, configuration is included from config.php

This commit is contained in:
7u83 2020-02-21 14:26:03 +00:00
parent 9a4efea282
commit ed0aa41d15
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,9 @@
<?php
session_start();
$CONVERT_CMD = "/usr/bin/pdftk";
require "config.php";
#$CONVERT_CMD = "/usr/bin/pdftk";
require_once('TCPDF/tcpdf.php');
@ -199,6 +201,11 @@ function convert($row) {
function calcSum(){
$sum =0;
if (!isset($_POST['amount'])) {
echo "wrong parameters";
die;
}
foreach ($_POST['amount'] as $val){
var_dump($val);
$sum += floatval(str_replace(",",".",$val));