Jim
Jim

Reputation: 9

Defining vars for database

I have worked with MySQL before but it has been a LONG time ago. Now I am trying to set up a database using phpMyAdmin.

I am trying to setup this database for the Article Friendly script. The instructions state that you need to use a little script that they have furnished:

define("DB_NAME","a6852953_article");
define("SERVER_NAME","'mysql12.000webhost.com'");
define("USER_NAME","a6852953_article");
define("PASSWORD","*********");
$dbhost=SERVER_NAME;
$dbuser=USER_NAME;
$dbpasswd=PASSWORD;
$dbname=DB_NAME;

It chokes on the first line, and if I remove that it chokes on whatever is there.

The syntax looks correct to me with what little I remember and I also checked the manual for 5.1 which is what my host uses.

Can anyone spot anything wrong?

Upvotes: 1

Views: 49

Answers (1)

jerdiggity
jerdiggity

Reputation: 3665

Looks like it might actually be choking on the second line...

define("SERVER_NAME","'mysql12.000webhost.com'");

... likely because you have single quotes inside the double quotes. Try changing the line to this:

define("SERVER_NAME","mysql12.000webhost.com");

If it is the first line however, make sure that the database you listed already exists -- if not, you should be able to login to phpMyAdmin and run:

CREATE DATABASE a6852953_article

:)

Upvotes: 2

Related Questions