The following function is not working. I cannot see why.
function access_apply($email,$pwd,$forname,$surname,$postcode,$telephone,$mobile){
global $cnx;
$pwd = bcrypt_hash($pwd);
$q = $cnx->prepare("INSERT INTO `users` (email, pwd, forename, surname, postcode, telephone, mobile) VALUES (:email, :pwd, :forename, :surname, :postcode, :telephone, :mobile)");
$q->execute(array(':email' => $email, ':pwd' => $pwd, ':forename' => $forename, ':surname' => $surname, ':postcode' => $postcode, ':telephone' => $telephone, ':mobile' => $mobile));
}
Once it is called the code breaks and nothing further is executed.