Jump to content

So this is secure?


9three

Recommended Posts

Hey,

 

I'm still getting used to using MySQLi. I just wanted to verify if this is actually secure.

 

$mysqli = new mysqli('localhost', 'user', 'password', 'world') or die('Unable to connect '.mysqli_connect_error());

$stmt = $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");
$stmt->bind_param('sssd', $code, $language, $official, $percent);

$code = $_POST['code'];
$language = $_POST['language'];
$official = $_POST['official'];
$percent = $_POST['percent'];

$stmt->execute(); 

 

No need to escape the POST variables because they are bounded?

Link to comment
https://forums.phpfreaks.com/topic/154833-so-this-is-secure/
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.