Beispiel #1
0
 public function insertion()
 {
     echo "hello";
     if (!is_dir("uploads/")) {
         mkdir("uploads/");
     }
     $dir = "uploads/";
     $valuePost = array("firstname" => $_POST['firstname'], "lastname" => $_POST['lastname'], "fathername" => $_POST['fathername'], "dob" => $_POST['dob'], "sex" => $_POST['sex'], "contact" => $_POST['contact'], "email" => $_POST['email'], "secondary" => $_POST['secondary'], "senior" => $_POST['senior'], "fn" => $_FILES['img']['name'], "target" => $dir . basename($_FILES['img']['name']));
     $student = new student();
     $error = $student->Insertion($valuePost);
     return $error;
 }