Jump to content

Mysqli Escape Strings


Pain

Recommended Posts

Hello. I have started using prepared mysqli statements such as this.

 

$username = $_POST['username'];
$password = $_POST['password'];
$password_repeat = $_POST['password_repeat'];
$email = $_POST['email'];

if ($stmt = $mysqli->prepare("INSERT INTO ww3_users (username, password, password_repeat, email) VALUES (?, ?, ?, ?)")) {

$stmt->bind_param('ssss', $username, $password, $password_repeat, $email);
$stmt->execute();
$stmt->close();
}

 

The question is - do i have to escape strings?

 

Thank you:)

Link to comment
https://forums.phpfreaks.com/topic/269627-mysqli-escape-strings/
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.