Problem Statement
What happens if mysqli_connect fails to connect?
Explanation
If mysqli_connect fails, it returns false. You can check this and display an error using mysqli_connect_error.
Code Solution
SolutionRead Only
if(!$conn){ echo mysqli_connect_error(); }Practice Sets
This question appears in the following practice sets:
