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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.