hm,
When you connect to your database,
you'll use the function mysql_connect(hostlocation, username, password);
the reason why you use localhost, is because your php-page is located on the same machine where the mysql-server is hosted, en root means you are running as superuser,
whith standardconfiguration, the superuser has no password, so that's why you leave the third blank.
It's best that you make a new user in your database, so when you fuck it up, you won't destory all your other data.
The addslashes function, adds quotes to a string
any other questions: mail me