Jump to content

SHA and Prpeared Statements


doubledee

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

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