Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to check if php is connected to database

<?php
$con = new mysqli("host","username","password","database");
echo $con ? 'connected' : 'not connected';
?>
 
PREVIOUS NEXT
Tagged: #check #php #connected #database
ADD COMMENT
Topic
Name
5+5 =