<?php
$con=mysql_connect('$url','$dbuser','$dbpass');
if(!$con){
die('cannot establish connection:'.mysql_error());
}
$db=mysql_select_db("$db");
if(!$db){
die('cannot found database:'.mysql_error());
}
?>
Giving warnings :-
Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\xampp\htdocs\connection.php on line 3
Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\xampp\htdocs\connection.php on line 3 cannot establish connection:php_network_getaddresses: getaddrinfo failed: No such host is known.
Can anyone help ?
$url
in single quotes will be treated as a literal string$url
not as a variable..... why are you quoting in the first place? – Mark Baker