$_SESSION['question'] = ucwords($_POST['question']); $_SESSION['hint'] = ucwords($_POST['hint']); $_SESSION['correct'] = ucwords($_POST['correct']); $_SESSION['choiceB'] = ucwords($_POST['choiceB']); $_SESSION['choiceC'] = ucwords($_POST['choiceC']); $_SESSION['choiceD'] = ucwords($_POST['choiceD']); $brain_Question->setLevel($_SESSION['level']); $brain_Question->setSubject($_SESSION['subject']); $brain_Question->setQuestion($_SESSION['question']); $brain_Question->setHint($_SESSION['hint']); $brain_Question->setCorrect($_SESSION['correct']); $brain_Question->setChoiceB($_SESSION['choiceB']); $brain_Question->setChoiceC($_SESSION['choiceC']); $brain_Question->setChoiceD($_SESSION['choiceD']); $brain_Question->setfile_name($file_name = $_FILES['quest_pic']['name']); $brain_Question->setfile_type($file_type = $_FILES['quest_pic']['type']); $brain_Question->setfile_path($file_path = "./user/" . $file_name); move_uploaded_file($_FILES['quest_pic']['tmp_name'], $file_path); } $verified_Question = $brain_QuestionDB->verify_Question($_SESSION['question']); if ($verified_Question) { $quest = "duplicate"; } else { $quest = "Added"; $brain_QuestionDB->brain_addQuestionDB($brain_Question); $getBid = $brain_QuestionDB->getQid($_SESSION['question']); $bid = $getBid->getQid(); $brain_Question->setQid($bid); $brain_QuestionDB->brain_addChoices($brain_Question); } $dup = '';