示例#1
0
function addApp()
{
    $name = isset($_POST["name"]) ? $_POST["name"] : '';
    $description = isset($_POST["description"]) ? $_POST["description"] : '';
    $category = isset($_POST["category"]) ? $_POST["category"] : '';
    $select = isset($_POST["select"]) ? $_POST["select"] : '';
    require 'model/appBD.php';
    if (add_bd($name, $description, $category, $select)) {
        return addMark_bd("0", $select, $name, true);
    } else {
        return false;
    }
}
示例#2
0
function addUser_bd()
{
    $lastName = isset($_POST["inputLastName"]) ? $_POST["inputLastName"] : '';
    $firstName = isset($_POST["inputFirstName"]) ? $_POST["inputFirstName"] : '';
    $email = isset($_POST["inputEmail"]) ? $_POST["inputEmail"] : '';
    $password = isset($_POST["inputPassword"]) ? $_POST["inputPassword"] : '';
    $country = isset($_POST["select"]) ? $_POST["select"] : '';
    $password_hash = password_hash($password, PASSWORD_DEFAULT);
    require 'model/utilisateurBD.php';
    if (add_bd($lastName, $firstName, $email, $password_hash, $country)) {
        require 'controler/map.php';
        page();
    } else {
        require 'controler/welcome.php';
    }
}