Results 1 to 3 of 3

Thread: Mysql login page issues

  1. #1
    Join Date
    Mar 2010

    Default Mysql login page issues

    I know this may sound quite easy but I have been having trouble creating a login/ join page for my site using mysql.
    I have tried several scripts but none work. I think I might be filling in the connect to database incorrectly.
    Any ideas on what I should be putting here?--

    // Connects to your Database
    mysql_connect("", "username", "password") or die(mysql_error());
    mysql_select_db("Database_Name") or die(mysql_error());

    I'm not sure what I should put for the fields especially host address and password. Im not sure whether Its the cpanel password.

    Please can someone help me out with that piece of code.

  2. #2
    Join Date
    Nov 2006
    Sydney, Australia


    The username and password that go there are ones you created specifically for the database using the database options in cPanel.

  3. #3
    Join Date
    Feb 2008


    One common problem I have seen is people forgetting to assign the database user to the actual databse. Also as far as "" use localhost. Please don't use your cpanel password, mainly for the reason if you ever change your cpanel password, you will then need to hunt down all your files you used it in, despite having your cpanel password stored in a document on your account.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts