Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check connection to database

<?php
$servername = "localhost";
$username = "username";
$password = "password";

// Create connection
$conn = new mysqli($servername, $username, $password);

// Check connection
if ($conn->connect_error) {
  die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php delete json object from a collection object 
Php :: csv file to associative array php 
Php :: php check string is int 
Php :: laravel subtract date 
Php :: iterate through an associative array php 
Php :: continue not in the loop or switch 
Php :: php zeilenumbruch 
Php :: replace php 
Php :: calculate 18 years back date in php 
Php :: each in laravel 
Php :: hide error in php 
Php :: php array order by value 
Php :: how to get a whole number from decimal in php 
Php :: get parameter php 
Php :: A non well formed numeric value encountered 
Php :: php previous page 
Php :: laravel merge collections 
Php :: get static front page 
Php :: laravel csrf token mismatch postman 
Php :: array_fill php 
Php :: acf get field 
Php :: remove controller cache laravel 
Php :: laravel eloquent get first 
Php :: IlluminateDatabaseQueryExcep Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) laravel 
Php :: socialite laravel 7 
Php :: for loop in laravel 
Php :: generate laravel event 
Php :: how do i open a new tab with php 
Php :: symfony see all make commands 
Php :: comment in php 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =