It still doesn’t work.
I changed it to “ChocoNut.sql”, made sure everything in the PHP files was attatched to it, and it still gives the same error.
It doesn’t give me the options to run a query or file, only to edit, delete rename or add files.
Do you have an SQL database setup? The .sql file is not the database, it's a file that you'll use to tell the a database you already have what table it should make.
In your web panel there should be a section called "DATABASES", within that section click on "MySQL Databases".
Enter a name for the database e.g. simplechat.
It'll make the database and the information will be below.
Some example information would be:
DB Name: epiz_12345678_simplechat
User Name: epiz_12345678
Password: "YOUR_CPANEL_PASS"
HostName: sql123.epizy.com
With that information you'd open up chat.inc.php and change the following:
Code:
function SimpleChat() {
//mysql_connect("localhost","username","password");
$this->sDbName = 'database_name';
$this->sDbUser = 'username';
$this->sDbPass = 'password';
}
to this:
Code:
function SimpleChat() {
//mysql_connect("localhost","username","password");
$this->sDbName = 'epiz_12345678_simplechat';
$this->sDbUser = 'epiz_12345678';
$this->sDbPass = 'YOUR_CPANEL_PASS';
}
After you've done that, you'll want to replace every instance of "localhost" to the host name, which in this example would be "sql123.epizy.com".
Once you've done all this you'll want to go back to your websites control panel and under "DATABASES" select "phpMyAdmin".
Once here click "Connect now!" next to the database you just created.
You'll be brought to a page with tabs at the top, click the tab that says "SQL".
Inside that box put the following:
Code:
CREATE TABLE `s_chat_messages` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`user` VARCHAR( 255 ) NOT NULL ,
`message` VARCHAR( 255 ) NOT NULL ,
`when` INT( 11 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Then at the bottom right click "Go".
It should hopefully say something like "Your SQL query has been executed successfully ( Query took 0.0123 sec )" at the top of the page.
You can then click the "Structure" tab at the top and hopefully a table should be there called "s_chat_messages".
Hopefully your website should now be able to communicate with the database.