<?php


function createUser($conn_rjllearning, $name, $dob, $gender, $username, $email, $mobile, $institution_id, $role, $password, $designation)
{
    

   
   try {
    $profile = null;
    $sql_users = "INSERT INTO users(name, dob, gender, username, email, mobile, institution_id, role, password, designation, profile, date_time_created, status)
    VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    $stmt_users = $conn_rjllearning->prepare($sql_users);

    $stmt_users->execute(array($name, $dob, $gender, $username, $email, $mobile, $institution_id, $role, $password, $designation, $profile, time(), '1'));

    // no need to send the password as it is already the same
    return $institution_id;
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

}