Example #1
0
<?php

require_once "business/klantservice.class.php";
//ipv md5 :>  bcrypt of sha256 or sha512
if (isset($_GET["action"]) and $_GET["action"] == "registreer") {
    try {
        klantservice::voegNieuweKlantToe($_POST["email"], md5($_POST["wachtwoord"]), $_POST["adres"], $_POST["naam"], $_POST["voornaam"], $_POST["postcode"], 0, $_POST["gemeente"]);
        print "Dank u voor uw registratie " . $_POST["voornaam"];
        header("location:mastercontroller.php?p=reg");
        exit(0);
    } catch (EmailBestaatException $tbe) {
        header("location:voegklanttoe.php?error=emailexists");
        exit(0);
    }
} else {
    $error = $_GET["error"];
    include "presentation/registreer.php";
    exit(0);
}