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

  • Home
  • SEARCH
  • 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 7671869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:09:22+00:00 2026-05-31T16:09:22+00:00

elseif(isset($_POST[‘submit’])) { // Look for their user $lookuser = mysql_query(SELECT * FROM `users` WHERE

  • 0
elseif(isset($_POST['submit']))
{
    // Look for their user
    $lookuser = mysql_query("SELECT * FROM `users` WHERE username='". mysql_escape_string($_POST['username']) ."'");
    // If we find a row
    if(mysql_num_rows($lookuser) > 0)

But my else for that, echos: An error has occured. <br> If you are sure you entered your username correctly, please contact an administrator.

I’ve tried to echo $_POST['username']; all works out fine. I’ve made sure my user exists, that works out fine.

The PHP error I get:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in password.php on line 23

  • 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-05-31T16:09:23+00:00Added an answer on May 31, 2026 at 4:09 pm

    You probably have an error in your sql query. To be sure of that, echo after your mysql_query mysql_error().

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

Sidebar

Related Questions

if (isset ($_POST['somethingA'])) { //code for doing something A } elseif (isset ($_POST['somethingB'])) {
Here is my code: if (isset($_POST['addmonths'])){ if (!empty($_POST['months'])){ if (is_numeric($_POST['months'])){ $monthtoadd = $_POST['months']; if
Here is my code: if (isset($_POST['addmonths'])){ if (!empty($_POST['months'])){ if (is_numeric($_POST['months'])){ $monthstoadd = $_POST['months']; if
PHP Code: <?php if (isset($_POST['pwsubmitted'])) { $pwsub=$_POST['pass']; if ($pwsub != TEST){ $s=1; $msg =
The code below is just a sample of the format I have isset($_GET['ids'])?$ids=$_GET['ids']:null; isset($_POST['idc'])?$idc=$_POST['idc']:null;
Ok, so I want to store some user options in $_COOKIES after form submit.
can someone assist me with fixing the error i'm receiving. $search_key = ''; /*if(isset($_POST)
Right now I have a set of if and elseif to set the height
ExpressionEngine template code: <div class=container_16> <div class=grid_16> {if {segment_1} == home} {embed=include/title title=welcome} {if:elseif
I'm writing some if/elsif statements to display error messages. When I leave the username

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.