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? 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. Link to comment https://forums.phpfreaks.com/topic/246675-sha-and-prpeared-statements/#findComment-1266758 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.