BrettHartel Posted December 18, 2012 Share Posted December 18, 2012 Thank you for taking the time to help me I am curious about this function when $salt is created. Will it use the $POST['eMail'] or does it use $eMail? eMail = "test@hotmail.com"; $_POST['eMail'] = "secret@hotmail.com"; $salt = generateSalt($_POST['eMail']); function generateSalt($eMail) { $salt = '$2a$13$'; $salt = $salt . md5(strtolower($eMail)); return $salt; } How could I make it so that any information I request is used in the function? For example: $salt1 = generateSalt($_POST['eMail']); $salt2 = generateSalt($_POST['Username']); $salt3 = generateSalt($_POST['FirstName']); $salt4 = generateSalt($_POST['LastName']); This is just an example I created to ape for future functions. Sincerely, Brett Hartel Quote Link to comment https://forums.phpfreaks.com/topic/272120-question-about-functions/ Share on other sites More sharing options...
BrettHartel Posted December 18, 2012 Author Share Posted December 18, 2012 figured it out. As long as the function includes the return() then it works Quote Link to comment https://forums.phpfreaks.com/topic/272120-question-about-functions/#findComment-1399997 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.