Jump to content

[SOLVED] Newb Help


blyz

Recommended Posts

I am using a php authentication system on my site that also uses mysql databases.

i am new to all this and i dont know what to type in this bit of code on my database.php page.

 

$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());

      mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());

 

i know my username and password for the database and my database is just called dbtables however when i type in dbtables i get this error

http://software-god.com/database.php

i am using a guide here - with_Admin_Features/17/60384/index.html

Thank-you.

Link to comment
https://forums.phpfreaks.com/topic/60219-solved-newb-help/
Share on other sites

If you are unsure of your database name and password, you'll need to contact your host. However, you say that you know your database is called dbtables. How do you know this? Do you log in somewhere(eg. phpMyAdmin) and it shows you this? If so, its likely that the username and password you enter here is the ones you need.

 

The server will most likely be localhost. Again though, you might need to contact your host/look through their FAQs

Link to comment
https://forums.phpfreaks.com/topic/60219-solved-newb-help/#findComment-299551
Share on other sites

i changed my  code to this

 

$this->connection = mysql_connect(localhost, blyz07, mypassword) or die(mysql_error());

      mysql_select_db(dbtables, $this->connection) or die(mysql_error());

and i am still getting an error but a different one:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'blyz07'@'localhost' (using password: YES) in /home/blyz07/public_html/database.php on line 28

Access denied for user 'blyz07'@'localhost' (using password: YES)

anybody know what im doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/60219-solved-newb-help/#findComment-299559
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.