So I've looked at responses from other threads, but I cannot find my error. Here is my php file:
<?php
define('con', 'con');
define('db_name','db_name');
define('mysql_user','mysql_user');
define('mysql_pass','mysql_pass');
define('server_name','server_name');
$db_name = "commentsdb";
$mysql_user = "root";
$mysql_pass = "root";
$server_name = "localhost";
$con = mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name);
if(!con)
{
echo "Connection Error...".mysqli_connect_error();
}
else {
echo "<h3>Database connection Success...<h3>";
}
?>
Here is my error: ( ! )
Warning: mysqli_connect(): in C:\wamp\www\webapp\init.php on line 11 Call Stack # Time Memory Function Location 1 0.0006 134536 {main}( ) ..\init.php:0 2 0.0007 135112 mysqli_connect ( ) ..\init.php:11
I've exhausted all options. Thanks!