I've created a new database using my cpanel>Mysql Databases
and then i created a php code and uplod it in my web disk public html..
how can i connect to database because i have this error
<?php $username = "acellec_acellec"; // MySQL Username $password = "francisco2"; //MySQL Password $server = "localhost"; // MySQL server you wish to connect to. Usually "localhost" $mysqlconnection = mysql_connect($server, $username, $password); if (!$mysqlconnection) { die('There was a problem connecting to the mysql server. Error returned: '. mysql_error()); } ?>
my code is like this
what user name will i use? and the local host to use please help
and then i created a php code and uplod it in my web disk public html..
how can i connect to database because i have this error
<?php $username = "acellec_acellec"; // MySQL Username $password = "francisco2"; //MySQL Password $server = "localhost"; // MySQL server you wish to connect to. Usually "localhost" $mysqlconnection = mysql_connect($server, $username, $password); if (!$mysqlconnection) { die('There was a problem connecting to the mysql server. Error returned: '. mysql_error()); } ?>
my code is like this
PHP:
<?php
$username = "acellec_acellec"; // MySQL Username
$password = "kkkk"; //MySQL Password
$server = "localhost"; // MySQL server you wish to connect to. Usually "localhost"
$mysqlconnection = mysql_connect($server, $username, $password);
if (!$mysqlconnection) {
die('There was a problem connecting to the mysql server. Error returned: '. mysql_error());
}
?>