Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8389597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:46:18+00:00 2026-06-09T18:46:18+00:00

I have a question for you. I am creating an administration panel, this is

  • 0

I have a question for you.
I am creating an administration panel, this is the first time for me, and I have some problems.

1. Problem
I am using mysqli_fetch_assoc() in this way:

    $row_cnt = mysqli_fetch_assoc($result);
        printf('Result set has %d rows.<br />', $row_cnt);

    if ($row_cnt['COUNT(id)'] == 0) {
       return false;
    } else {
       return true;
    }

I use this to see if in the DB there are some entries, it returns 1 everytime, whatever thing I insert in the fields. I thought that it has to return 0 if there are no entry in the DB, am I wrong?


Please be patient, this is my first login page with admin panel.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:46:20+00:00Added an answer on June 9, 2026 at 6:46 pm

    Just from taking a quick peek –

    mysql_real_escape_string requires a connection to be established via mysql_connect, you need to use the mysqli_real_escape… function – http://php.net/manual/en/mysqli.real-escape-string.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this question: creating 2 pages in php the first(index.php) contain a form
I have question. I have some app on facebook and getting this error Fatal
I have a little question about creating a table using another tables. my code:
I can't be the first person to have this problem, I must be missing
I'm creating my first real binary parser (a tiff reader) and have a question
Im using phpmyadmin for a website i'm creating and have a question about a
I have a question, but let me first say that this is being performed
I have seen a couple of question regarding creating datasets in DbUnit here on
I am creating an app which will have a question in a UILabel and
I have a question. When i am creating an application in rhomobile jquery.mobile.structure-1.0.css present

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.