function formulaireEnregistrement() { startSession(); if ($_SESSION["connu"] === true) { printSession(); echo "Vous êtes déjà connecté(e).</br>\n"; } else { if (!isset($_POST["submit_register"])) { // Afficher le formulaire d'enregistrement echo '<div id="form">' . "\n"; print_register_form(); echo "</div>"; } else { $err = fullCheck($_POST); if ($err != "") { echo " COUCOU LES AMIS"; echo '<div id="form">' . "\n"; print_register_form(); echo $err; echo "</div>"; } else { addRowToUserTable($_POST); login($_POST["mail"], $_POST["mdp"]); printSession(); } } } }
/** * Wrapper function to call template 'print_register_form' function * @param boolean $edit whether this is an edit or a new register * @param array $data values to auto fill * @param string $msg error message to print out * @param string $id member id to edit */ function print_register_form($edit, $data, $msg = '', $id = '') { print_register_form($edit, $data, $msg, $id); // Function in auth.template.php }