Jump to content

Mysql insert problem


monkeybidz

Recommended Posts

why not trying to store your encrypted string in the $pass variable first.. that way you won't be trying to insert a function into a db table field...

 

$pass = $_POST['pass'];

$secure_pass = AES_ENCRYPT($pass, $mysecretkey);

 

then insert $secure_pass into the table....

 

this is how i would try it, however i'm still rank n00b myself so, probably best taken with a grain of salt ;)

Link to comment
https://forums.phpfreaks.com/topic/72887-mysql-insert-problem/#findComment-367661
Share on other sites

Ok, i got it to post all the fields now, but now i need to encrypt the password and be able to decrypt. What i am posting here will only insert the secret key+password+secret key again, but is it safe?

 

$password=$mysecretkey.$_POST['pass'].$mysecretkey;

$insert=mysql_query("INSERT INTO `userlist` (id, name, email, password, startdate)VALUES('','$name','$email','$password',now())");

Link to comment
https://forums.phpfreaks.com/topic/72887-mysql-insert-problem/#findComment-368399
Share on other sites

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.