MSSQL doesn’t have a direct md5
function (you can convert it as demonstrated here). You need to use it through PHP like so:
$sqla = "INSERT INTO users (username, password)
VALUES ('rob_dewar01', '" . md5('KingDozer') . "')";
Also, md5
is not secure. Look into using prepared statements.
See the Secure hash and salt for PHP passwords question for more information about hashing passwords in PHP.
6
solved PHP Insert Table Data Code not Inserting Data into MSSQL Table [closed]