raydona Posted August 27, 2014 Share Posted August 27, 2014 Hi,The array shown below is causing problems. I know this for sure because when I comment the array out the script runs. Is it: 'pswrd1'=>SHA1('$_POST['pswrd1']') inside the array causing the script not to run?? All help will be greatly appreciated.$register_data =array('username'=>$_POST['username'], 'first_name'=>$_POST['first_name'], 'last_name'=>$_POST['last_name'], 'address'=>$_POST['address'], 'postcode'=>$_POST['postcode'], 'country'=>$_POST['country'], 'e_mail'=>$_POST['e_mail'], 'pswrd1'=>SHA1('$_POST['pswrd1']'), 'phone_no'=>$_POST['phone_no']); Quote Link to comment Share on other sites More sharing options...
cpd Posted August 27, 2014 Share Posted August 27, 2014 (edited) If you're keeping the mapping you can just do $data = $_POST; $data['pswrd1'] = sha1($_POST['pswrd1']); The error is due to wrapping the password variable in your sha1 call with apostrophes. You don't need to as shown above. Edited August 27, 2014 by cpd Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.