public function removePumpReading() { require 'models/Stocks_model.php'; $id = $_POST['ID']; $model = new Stocks_model(); if ($model->removePumpReading($id)) { echo "Success"; } else { echo "Failed"; } }