public function insertEveningOrder() { require 'models/Stocks_model.php'; $readingPetrol = $_POST['petrol']; $readingSPetrol = $_POST['spetrol']; $readingDiesel = $_POST['diesel']; $readingSDiesel = $_POST['sdiesel']; $qntyPetrol = $_POST['qntyPetrol']; $qntySPetrol = $_POST['qntySPetrol']; $qntyDiesel = $_POST['qntyDiesel']; $qntySDiesel = $_POST['qntySDiesel']; $model = new Stocks_model(); $model->insertEveningStock($readingPetrol, $qntyPetrol, $readingSPetrol, $qntySPetrol, $readingDiesel, $qntyDiesel, $readingSDiesel, $qntySDiesel); $model->updateTank($qntyPetrol, $qntySPetrol, $qntyDiesel, $qntySDiesel); echo "DONE"; }