Jump to content

h1234

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by h1234

  1. hi thanks i did that and it says Unknown column 'password ' in 'where clause'Array ( )
  2. Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given its a login form here is my code thats producing the error .i need to test if user_is true. function login($username , $password){ GLOBAL $dbc; //database $user_id= user_id_from_username($username); $username = sanatize($username); $password = md5($password); $query= mysqli_query($dbc,"SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `password ` = '$password'"); $check= mysqli_fetch_array( $query , MYSQLI_BOTH); // even if i add this set of code the query still gives the above error. return ($check[0]==1)? $user_id : false; }
  3. its a login form here is my code thats producing the error . I am really new to php. this is for a project . thanks for the help. function login($username , $password){ GLOBAL $dbc; //database $user_id= user_id_from_username($username); $username = sanatize($username); $password = md5($password); $query= mysqli_query($dbc,"SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `password ` = '$password'"); MYSQLI_ERROR($query); $check= mysqli_fetch_array( $query , MYSQLI_BOTH); // even if i add this set of code the query still gives the above error. }
×
×
  • 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.