I am looking into PDO (to be honest never knew what it was until a week or so ago) But when i try to insert data i have it so it should echo a successfully saved message. But all i am recving is a black white page.
Here's the class that is housing my add member.
And then on another page i am doing:
public function __constuct($nameFirst,$nameLast,$email,$pass)
$this->email = $email;
$this->nameFirst = $nameFirst;
$this->nameLast = $nameLast;
$this->pass = $pass;
$this->group = '2';
$hashpasswd = hash('sha256', $pass);
$salt = '';
$level1paswd = $hashpasswd."".$salt;
$pepper = '';
$passWd = $level1paswd."".$pepper;
$queryAdd = 'INSERT INTO members (nameFirst,nameLast,password,email,group) VALUES (:Firstname,:Lastname,:password,:email,:group)';
$prepare = $dbCon->prepare($queryAdd);
'Firstname' => $This->nameFirst,
'Lastname' => $this->nameLast,
'password' => $passWd,
'email' => $this->email,
'group' => $this->group)
echo "<p class='success'> The member sucessfully inserted in the database they can now login in with the password you entred!</p>";
i have the Database and all that defined up in another file and am including that at the top.
$nameFirst = $_POST['firstname'];
$nameLast = $_POST['lastname'];
$email = $_POST['email'];
$pass = $_POST['pass'];
$addMember = new addMember($nameFirst,$nameLast,$email,$pass);
Any one seeing anything i am missing?
Like i said i am new to PDO and not sure i fully 'get it' yet