Mysqli is not working in php version 7

## By using this function we can reduce errors and can work using mysql instead of mysqli. <?php if (PHP_VERSION_ID > 59999) { function mysql_connect($a,$b,$c,$d=null) { return mysqli_connect($a,$b,$c,$d); } function mysql_query($a,$b) { return mysqli_query($b,$a); } function mysql_affected_rows($a){return mysqli_affected_rows($a);} function mysql_close($a){return mysqli_close($a); } function mysql_fetch_assoc($a) { return mysqli_fetch_assoc($a); } function mysql_free_result ($a) { mysqli_stmt_free_result($a); } function … Read moreMysqli is not working in php version 7

How to connect using Mysqli, Mysql & PDO in php

## All connection are shown below.Like mysql, mysqli, PDO <?php // mysqli $mysqli = new mysqli(“example.com”, “user”, “password”, “database”); $result = $mysqli->query(“SELECT ‘Hello, dear MySQL user!’ AS _message FROM DUAL”); $row = $result->fetch_assoc(); echo htmlentities($row[‘_message’]); // PDO $pdo = new PDO(‘mysql:host=example.com;dbname=database’, ‘user’, ‘password’); $statement = $pdo->query(“SELECT ‘Hello, dear MySQL user!’ AS _message FROM DUAL”); $row … Read moreHow to connect using Mysqli, Mysql & PDO in php

How to connect using mysqli_connect in php

<?php //echo “I am Working Now”; $dbhost = “localhost”; dbuser = “root”; $dbpass = “”; $dbname = “chandan_test” $link = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname); $ss = mysqli_fetch_assoc(mysqli_query($link,”select * from user”)); print_r($ss); ?>

How to Connect Database in php

# It used in core php $dbhost = HOSTNAME; $dbuser = DATABASE USERNAME; $dbpass = DATABASE_PASSWORD; $dbname = DATABASE_NAME; $link = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);