How To Use MySQL In PHP Pages
In order to use your MySQL Database in your PHP pages, there are a few items you
must do before you can upload your page(s) to your CGI server:
You must have a CGI Server Account.
Choose a separate password for this account. The CGI server is not the
same as your Web Space.
Be sure you have activated your MySQL Database.
You will need to choose a separate password for this as well.
In your php page or config file that goes with your php page(s), find the area
that requires a host to be entered. Fill in localhost for this.
Find the area that requires your MySQL Database Username or User ID. In
this area you want it set to something like yourdomaincom, substituting
your actual domain name without the dot between the domain and extension.
Find the area that requires your Password. This is the separate password
you created when you activated your MySQL Database.
Find the area(s) that require your Database or Database Name. Keep in
mind that you only get one database with your Active Web Hosting account.
This database name is the exact same as your MySQL Database Username. Make sure
that tables being created in the database do not overwrite tables created by
other PHP scripts you may install. Some PHP scripts allow you to specify a
prefix to keep the tables separate for use with one set of PHP pages.
Now you are ready to upload your PHP page(s). Use an FTP client to log into your
CGI server. Your CGI server's FTP host address will be something like
cgi.yourdomain.com where yourdomain.com represents your actual
domain name. Log in with your domain name as your user name, and your CGI server
password, which is a separate password from your web space FTP password that you
choose when you activate your CGI Server Account.
To access your PHP page(s), point your web browser to
http://cgi.yourdomain.com/yourpage.php where yourdomain.com
represents your actual domain name and yourpage.php represents the PHP
page you uploaded (or if a set of pages, this might usually be index.php or
config.php, for example).
If you would like to access and work with your database, you can use
Log in using your MySQL Database Username and MySQL password.