To fillin the form that you have with a new database, follow these steps:
1. Goto www.yourdomain.com/cPanel and click on the "MySQL Databases" icon.
2. Enter a name into the "Db: " field and click "Add Db". This will create a new database. For example, if you enter "TestDb" into the field, then your new database will be called "<CPANEL_LOGIN>_TestDB" where <CPANEL_LOGIN> is the account name you use to login to cPanel.
3. Now you have to create a new account for accessing the database. Under the "Users:" section enter a username and password for a NEW account. Do not enter the login/password for your cPanel account. For example, I'll create a new account with the username "TestDbLogin" and password "TestDbPass". The new account will be created with a username of "<CPANEL_LOGIN>_TestDbLogin" where <CPANEL_LOGIN> is the account name you use to login to cPanel.
4. You have now created a new database with a corresponding account. Note, this database is empty; it contains no tables and no data.
5. Now you can fill in the script you have with the information about the database and username you just created:
PHP:
<?php
//connection info
$login = "<CPANEL_LOGIN>_TestDbLogin"; /* The login name you created to access the database in step 3. */
$password = "TestDbPass"; /* The password you created for the account above. */
$database = "<CPANEL_LOGIN>_TestDB"; /* This is the name of the database your connecting to, which you created in step 2. */
/* ----- YOU DO NOT HAVE TO EDIT ANYTHING BELOW THIS LINE ----- */
//connection
$conn = mysql_connect("localhost","$login","$password");
$db = mysql_select_db("$database"); /* This is the php function to tell the server to start using the new database you created. */
//misc info
$ip = $_SERVER['REMOTE_ADDR']; /* This gets the client IP to be recorded in the database. */
$time = time(); /* time(); is the PHP function to get the current time. The time will be recorded in the database for record keeping. This is UNIX time which is stored in seconds.*/
Now, mind you, you have not created any tables for your database and your database will not contain any data. You will have to create tables in your database before you can start storing/retrieving data with it.