Jump to content

states

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by states

  1. I can't seem to connect my database to my PHP file since it keeps coming up as an access denied.

     

    An example script I have is:

     

    <?php
    $mysqli = new mysqli("localhost", "states_username", "[what the password is]", "states_test");
    $sql="SELECT 1+1";
    $result = mysqli_query($mysqli,$sql);
    ?>

     

     

    When I run it, I get: "

    Warning: mysqli::mysqli(): (HY000/1044): Access denied for user 'states_username'@'localhost' to database 'states_test' in /home/states/public_html/[redacted].php on line 2

    Warning: mysqli_query(): Couldn't fetch mysqli in /home/states/public_html/[redacted].php on line 4

    "

×
×
  • Create New...