XAMPP 7.2.0 MySQL error: Call to undefined function mysql_se
Posted: 21. April 2018 19:25
error msg: Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in X:\geoLatLng.anm8\public_html\test-02.php:28 Stack trace: #0 {main} thrown in X:\geoLatLng.anm8\public_html\test-02.php on line 28
WAMP server (windows error for anyone searching)
it fails locally but on the live server running FreeBSD I have no issues.
I'm beating my head against the wall, any help would be greatly appreciated.
WAMP server (windows error for anyone searching)
- Code: Select all
<?php
// DB
error_reporting(E_ALL);
ini_set('display_errors', '1');
define('DB_HOST', 'localhost');
define('DB_NAME', 'nuckinfuts');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
$con = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
//echo DB_HOST;
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db(DB_NAME, $con) or die(mysql_error());
session_start();
?>
it fails locally but on the live server running FreeBSD I have no issues.
I'm beating my head against the wall, any help would be greatly appreciated.