PHP - mysqli_num_rows doesn't work correctly

I have an admin panel in my website in which the admin creates new pages. he provides the page name, and then the spaces or other characters gets removed by PHP code and is declared to a variable called $new_p_id.

The php code checks if the page id exists, and then if it exists, the PHP code returns error. The problem is that even when I type “home” or “about” in the form, the mysqli_num_rows return 0. I don’t know what’s wrong. I’ve tried mysqli_error($con) but it doesn’t return any errors.

This is a place where we discuss Firefox DevTools issues/feature request , so your question doesn’t really belong here.

I suggest you to ask in something like stackoverflow.com/

1 Like

Ok, thank you very much.