PHP mySql isnt inserting into Database -
$insert = $pdo->prepare('insert user set fname=:fname, lname=:lname, uname=:uname, email=:email, password=:hashpass'); $insert->bindparam(':fname', $fname); $insert->bindparam(':lname', $lname); $insert->bindparam(':uname', $uname); $insert->bindparam(':email', $email); $insert->bindparam(':hashpass', $hashpass); $insert->execute();
it not inserting database. variables have values , other mysql statements working cant seem insert data table? using pdo::errorcode()
returns 00000
as far see query mixed insert , update statements syntax.
instead of:
prepare('insert user set fname=:fname, lname=:lname, uname=:uname, email=:email, password=:hashpass');
try one:
prepare('insert user (fname, lname, uname, email, password) values (:fname, :lname, :uname, :email, :hashpass');