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');


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -