Family_job::Update($job_id, $f_member); //call the method to save in DB the name of the employee if ($query === TRUE) { $_SESSION['info'] = 'New job add'; //user info header("Location: ../main.php"); } else { $_SESSION['info'] = 'Error'; //user info header("Location: ../main.php"); } } if ($member_id == 3) { //keep the job child //$Add_job = new Family_child(); //create ogject of registr_user class $query = Family_child::insert($job_id, $member_id, $job_title); //call the class method to check user data in MySQL Table Family_job::Update($job_id, $f_member); //call the method to save in DB the name of the employee if ($query === TRUE) { $_SESSION['info'] = 'New job add'; //user info header("Location: ../main.php"); } else { $_SESSION['info'] = 'Error'; //user info header("Location: ../main.php"); } } } }
//call the method to save in DB the name of the employee if ($query === TRUE) { $_SESSION['info'] = 'New job add'; //user info header("Location: ../main.php"); } else { $_SESSION['info'] = 'Error'; //user info header("Location: ../main.php"); } } if ($f_member == 'child') { //keep the job child $Add_job = new Family_child(); //create ogject of registr_user class $query = $Add_job->insert($job_id, $job_title); //call the class method to check user data in MySQL Table $Job_performs = new Family_job(); //create an object of class Family_job $Job_performs->Update($job_id, $f_member); //call the method to save in DB the name of the employee if ($query === TRUE) { $_SESSION['info'] = 'New job add'; //user info header("Location: ../main.php"); } else { $_SESSION['info'] = 'Error'; //user info header("Location: ../main.php"); } }