Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.