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 4320494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:38:26+00:00 2026-05-21T08:38:26+00:00

Warning: mysqli_close() expects parameter 1 to be mysqli, object given in /home/mjcrawle/public_html/toga/homefile/processlogin.php on line

  • 0
Warning: mysqli_close() expects parameter 1 to be mysqli, 
    object given in /home/mjcrawle/public_html/toga/homefile/processlogin.php on line 63

I am trying to connect a database and I am getting the above error. I I am using 4 different includes in this file and the include are before I try to connect to the database.

Sample of one of my includes

require_once('../homefile/class/database.class.php');

The include work fine and this is my line of code to connect my db.

/*New database Object*/
$db = new Database;

I am kind at a loss… The database is closed.

mysqli_close($db);

There is a ton of code but I am not sure anyone would want to wade though it. If you can thing of anything let me know.

  • 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-21T08:38:27+00:00Added an answer on May 21, 2026 at 8:38 am

    Firstly, mysqli_close expects the arugment to be a handle opened with mysql_open, but instead you’ve passed it a Database object.

    Secondly, we don’t know what that class contains, but I would expect that it has a method like ->close() that closes the database connection.

    Ie,

    $db->close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\xampp\htdocs\test\index.php on line
The warning I'm getting is: Warning: mysqli_result::fetch_array() expects parameter 1 to be long, object
Here is my error: Warning: mysql_query() expects parameter 2 to be resource, null given...
Warning:mysql_fetch_array(): supplied argument is not a valid MySQL result resource in **/home/davzyco1/public_html/notes/functions.php** on line
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while
I get: "Resource id #8 Warning: mysql_fetch_array() expects parameter 1 to be resource, string
When I run this Query I recieve Warning: mysqli_fetch_array() expects parameter 1 to be
Output: Warning: mysql_query(): 6 is not a valid MySQL-Link resource in C:...\mysql_helper.php on line
I get a warning message telling me that mysql_fetch_row expects a resource for parameter
The problem I have is that it is giving me a warning in mysqli

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.