Home > Article > Backend Development > PHP 5619 connects to the database. Unable to connect to the database. How to connect to the database. plsql connects to the database.
It is not recommended to use mysql_connect, mysql_query and other functions in PHP5.3 and above versions. Instead, use the mysqli series (improved). This is an example of connecting to a database and querying data.
'; while($row=mysqli_fetch_assoc($result)){ echo $row["name"]." ".$row["surname"].'
'; } mysqli_free_result($result); } else{ echo "the query is not executed.".'
'; } mysqli_close($link); ?>
The above introduces PHP 5619 to connect to the database, including the content of connecting to the database. I hope it will be helpful to friends who are interested in PHP tutorials.