$conn = new mysqli();
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";
// Create connection
$conn= mysqli_connect($servername,$username,$password,$dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected Successfully.";
?>
Also in PHP:
- check if array has key php
- Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 9263312 bytes) in /home/arsalan farooq/local security.uk/wp-includes/wp-db.php
- clear cache from admin panel laravel
- date format in php for AM PM
- Laravel Validation check array size min and max
- count character php
- fetch visitor ip address php
- check if date between two dates laravel
- check fo rtype of input php
- ci4 throw new exception
- ClearCache laravel
- errors throwing in php
- buddypress author link
- day of the week th usig php
- add one day to date in php
- $this- attribute laravel
- check if key exists array
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- 500 server error heroku laravel
- alphanumeric_rand php
- file_get_contents disable ssl check
- cakephp 2 savefield
- catching errors in php
- $headder in php