Need Help in PHP MySQL?

Discussion in 'PHP' started by AimyThomas, Aug 30, 2012.

  1. AimyThomas

    AimyThomas Banned

    Joined:
    Aug 28, 2012
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    0
    PHP MySQLI code not working

    $q = "UPDATE users SET password = '6c55803d6f1d7a177a0db3eb4b343b0d50f9c111' WHERE id = '1';";
    mysqli_query($dbc, $q);

    Dot knows but some cause it keeps giving me the following error:

    Warning: mysqli_query()

    Expects parameter 1 to be mysqli, null given


    Can anyone help me

    Thanks in advance
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Moved to PHP forum.

    Also the error is pretty self explanatory.

    parameter 1 to be mysqli, null given which means your $dbc variable is null.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice