it’s $_POST not $_post, plus only seeing a partial code I highly doubt that it’s going to work.
here’s a partial snippet of my code, the thing I am trying to point out to you is the first line:
[php]if (isset($_POST[‘action’]) && $_POST[‘action’] == ‘submit’) {
$character = new Registration();
$errorMsg = NULL;
$data['username'] = trim($_POST['username']); // Required
$password = trim($_POST['pass']);
$passOK = $character->isPassWordStrong($password);
if ($passOK) {
$errorMsg = '<li class="stop-bullet">Password must be at least 8 characters, </li><li class="stop-bullet">and must contain at least one lower case letter, </li><li class="stop-bullet">one upper case letter and one digit</li>';
} else {
$data['pass'] = password_hash($password, PASSWORD_BCRYPT, array("cost" => 15));
}
$password = NULL;
$data['email'] = trim($_POST['email']); // Required
$data['school'] = $_POST['school'];
$data['gradeLevel'] = $_POST['gradeLevel'];
$data['gender'] = $_POST['gender'];
$data['stereoType'] = $_POST['stereoType'];[/php]
I use a hidden field along with a submit button:
<input type="hidden" name="action" value="submit" />