- There has been other questions but they are all outdated
define('DBUSER', 'Pho');
define('DBPASS', 'pass');
define('DBSERVER', 'chides');
define('DBNAME', 'partstest1');
$conn = new mysqli(DBSERVER, DBUSER, DBPASS, DBNAME);
if (!$conn) {
die('error connecting to database');
}
echo 'connection!';
?>
This throws up the error: [Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\xampp\htdocs\Form\phpmk1.php on line 7
Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\xampp\htdocs\Form\phpmk1.php line 7
I am aware that php 7 no longer uses the mysql_ commands is there a work around for this? I am also going to be using this to take data from a local webform to then place inside the database shown I was told sqli would work but im not sure if i am doing it right
Any help would be greatly appreciated. Thanks