//0-none, 1-monthly,2-yearly $kid = $_REQUEST['kid_id']; $uid = $_REQUEST['user_id']; if (!($kid && $uid)) { $success = "0"; $msg = "Incomplete Parameters"; $data = array(); } else { $sql = "delete from `kids` where id=:id"; $sth = $conn->prepare($sql); $sth->bindValue('id', $kid); try { $sth->execute(); $success = '1'; $msg = 'Kid Deleted'; $data = DataClass::get_all_kids_user($uid) ? DataClass::get_all_kids_user($uid) : []; } catch (Exception $e) { } $sql = "delete from `jobs` where kid_id=:kid"; $sth = $conn->prepare($sql); $sth->bindValue('kid', $kid); try { $sth->execute(); } catch (Exception $e) { } $sql = "delete from `job_status` where kid_id=:kid"; $sth = $conn->prepare($sql); $sth->bindValue('kid', $kid); try { $sth->execute(); } catch (Exception $e) {