You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[#OOP Note#In PHP we access class method or properties using -> not . like the most languages|In PHP we access class method or properties using -> not . like the most languages]]
[[#info|info]]
[[#Connect to Database (MySQLi Object-Oriented)|Connect to Database (MySQLi Object-Oriented)]]
[[#Connect to Database (MySQLi Object-Oriented)#new mysqli|new mysqli]]
[[#new mysqli#sqli stands for SQL Improved not SQL injection 😄|sqli stands for SQL Improved not SQL injection 😄]]
if (mysqli_connect_errno()) { // errno -> error Number (0 if no errors)echo"Failed to connect to MySQL: " . mysqli_connect_error(); // print the error exit();
}
$hashed_passwd = password_hash($plain_text_passwd, PASSWORD_DEFAULT);
# We just want to hash our password using the current DEFAULT algorithm. # Beware that DEFAULT may change over time, so you would want to prepare