doubledee Posted September 8, 2011 Share Posted September 8, 2011 Is this the correct syntax to use the SHA function within a Prepared Statement?? $q = "INSERT INTO member(email, pass, first_name, activation_code, created_on) VALUES(?, ?, ?, ?, NOW())"; // Prepare statement. $stmt = mysqli_prepare($dbc, $q); // Bind variable. mysqli_stmt_bind_param($stmt, 'ssss', $email, SHA('$pass'), $firstName, $activationCode); // Execute query. mysqli_stmt_execute($stmt); Thanks, Debbie P.S. Is there a way to BOLD text within the [ php ] tags? Quote Link to comment https://forums.phpfreaks.com/topic/246675-sha-and-prpeared-statements/ Share on other sites More sharing options...
trq Posted September 8, 2011 Share Posted September 8, 2011 Providing the SHA function is defined somewhere that syntax is fine. And no, there is no way to bold text within the syntax highlighting. Quote Link to comment https://forums.phpfreaks.com/topic/246675-sha-and-prpeared-statements/#findComment-1266758 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.