Honestly, I'm a newbie in this one so I need some assistance.
I have a file, which is named install.php, to install some mysql codes to my mysql database, which happens when I open install.php, and goes like this:
<?php
require_once("connect.php");
$query = mysql_query("
CREATE TABLE `members` (
`id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 50 ) NOT NULL ,
`firstname` VARCHAR( 50 ) NOT NULL ,
`lastname` VARCHAR( 50 ) NOT NULL ,
`password` VARCHAR( 50 ) NOT NULL ,
`date` VARCHAR( 50 ) NOT NULL ,
`ip` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`username`
)
)");
echo "Installed! Please delete this file.";
?>
It shows that it requires connect.php and it goes like this:
<?php
// MySQL connect information.
$c_username = "username";
$c_password = "password";
$c_host = "localhost";
$c_database = "database";
// Connect.
$connection = mysql_connect($c_host, $c_username, $c_password)
or die ("It seems this site's database isn't responding.");
mysql_select_db($c_database)
or die ("It seems this site's database isn't responding.");
?>
I'm really not sure what to type in those bold texts. When I enter wrong info and I'm about to open install.php, the error goes like this:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '10.10.96.130' (4) in /home/forti09/public_html/connect.php on line 10
It seems this site's database isn't responding.
Tried to place 10.10.96.130 and mysql.x10hosting.com for the $c_database and still I got errors, like this:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '10.10.96.130' (4) in /home/forti09/public_html/connect.php on line 10
It seems this site's database isn't responding.
Can you guys look in my database and tell me what to do?
I really need some help here to continue my project.
Thanks.