php - MYSQLI_NUM_ROWS THROWS SERVER ERROR -


Can someone please explain to me that when I use the mysqli_num_rows () function, why do I keep the following error?

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator for notifying that time. That error has occurred and whatever may be the reason for the error could have been you.

More information about this error may be available in the server error log.

This is my PHP script:

  & lt ;? Php // store user input variable $ username = $ _POST ['username']; $ Password = $ _POST ['password']; // user chooses from the table $ sql = "SELECT * members from WHERE user name = '$ user name' and password = '$ password'"; $ Result = mysqli_query ($ con, $ sql); $ count = mysqli_num_rows ($ result); / * // session starts and sets a cookie if the count is correct ($ count> = 1) {session_start (); $ _SESSION ['username'] = ''; $ _SESSION ['password'] = ''; Header ("location: index.html"); } // sends the message if the user does not match the input database {echo "invalid user name or password"; } * /? & Gt;   

Before it works fine I get mysqli_num_rows () function in this error I am using Plesk on a Godaddy server.

  1. You will need to learn how to read php and mysquila errors
  2. You need to learn how to properly use mysqli
  3. Do not pay any attention to this function

    First
    and others - Just get your data and use it as the flag for the last

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -