Jump to content

trying to insert a MD5'ed variable into a MYSQL table but cant


silverglade

Recommended Posts

hi, my script is supposed to insert the word "password" as an MD5'ed string into my table. but it doesnt . here is my code, any help GREATLY appreciated as ive been working on this for a few hours. LOL. thank you. derek

 

 

<?php

include("connect1.php");


$1a = "password";
md5($1a);




mysql_query("INSERT INTO members (Email, Password)
VALUES ('[email protected]','$1a')");


if(mysql_error())
{
echo "Error: " . mysql_error();
}
else
{
echo "Worked fine";
}

?>

great thank you very much. i changed it and the code is still not updating the table and not showing the "worked" message. here is the code im using now. any more help greatly appreciated thank you.

 

<?php

include("connect1.php");


$1a = "password";
$1a = md5($1a);




mysql_query("INSERT INTO members (Email, Password)
VALUES ('[email protected]','$1a')");


if(mysql_error())
{
echo "Error: " . mysql_error();
}
else
{
echo "Worked fine";
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.