I am having trouble of finding why my code is not working . I tried to look up on the internet but I can't seem to find the error Here's my function
<?php
include "gar-connect.php";
try {
$stmt = $conn->prepare ("INSERT INTO gebruiker(voornaam,achternaam,gebruikerid,wachtwoord,)
VALUES (:voornaam, :achternaaam, :gebruikerid,:wachtwoord)");
$stmt->bindParam(':voornaam ',$voornaam);
$stmt->bindParam(':achternaam ',$achternaam);
$stmt->bindParam(':gebruikerid ',$gebruikerid);
$stmt->bindParam(':wachtwoord ',$wachtwoord);
if(isset($_REQUEST['voornaam'])){
$voornaam = $_POST['voornaam'];
$achternaam = $_POST['achternaam'];
$gebruikerid= $_POST['gebruikerid'];
$wachtwoord= $_POST['wachtwoord'];
$stmt->execute();
header('location: select.php');
}
}
catch(PDOException $e){
echo "Error:" .$e->getMessage();
}
$conn = null;
?>