$sql = "SELECT * FROM tbl_Users WHERE Email='$Email'"; $result = mysqli_query($conn, $sql); the $result value in this case is the mysqli object, but as mac_gyver previously mentioned: it is not the actual result of the query. You will still need another mysqli_fetch_* function to retrieve the data. Since all you need the above function to perform is return a count, you can implement that in the SQL itself, which is far more efficient. You should look into editing your query to implement a COUNT, as well as adding a mysqli_fetch_* function to return said count. Which mysqli_fetch_ function you should use, you can lookup in the documentation. A good practise would be to make sure the returned COUNT works before trying to insert anything into the database. It makes debugging a lot easier.