0
<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "ecdb";
mysql_connect($dbhost,$dbuser,$dbpass) or die('cannot connect to the server'); 
mysql_select_db($dbname) or die('database selection problem');
?>

Error:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\WebEnt\dbconfig.php on line 6

How should i fix this instead of ignoring the error message

Sahil Gulati
  • 15,028
  • 4
  • 24
  • 42
Jake Cube
  • 143
  • 1
  • 2
  • 17

0 Answers0