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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:33:22+00:00 2026-06-08T03:33:22+00:00

This query is not updating the row in the database. $link = mysqli_connect(localhost, username,

  • 0

This query is not updating the row in the database.

$link = mysqli_connect("localhost", "username", "password", "database");
mysqli_query("UPDATE `LOGIN` SET `HASH`='$hash' WHERE `USER`='$user'");

It simply does not update the hash in the row. I have checked the query in PMA and it seems to be running correctly. I have echo’ed out my $hash and $user variables on the screen to ensure they are valid, and they were. The mysqli_connect credentials are also correct… any input?

I have also tacked this onto mysqli_query and it just printed out “Error desc:” as I believe my server has errors off.

or die("Error desc: ".mysqli_error($link));

Thank you for any help!

EDIT: The table has around 3 records, so there’s duplication is not issue here. Also, before anyone mentions it, I will be added a primary key to the table for each user and I will switch the mysqli to OO style once I figure out what’s going on.

  • 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-08T03:33:25+00:00Added an answer on June 8, 2026 at 3:33 am

    alfasin wrote in the comments to use bind_param (http://www.php.net/manual/en/mysqli-stmt.bind-param.php)

    It worked great. It is good for both OO and procedural.

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

Sidebar

Related Questions

I have this query and it's not updating into the database. The given where
My mysql query is not updating my database correctly can some one help me
We're having mysterious network problems with MySQL. Simple update query (updating single row using
why this simple query not working. I know it was OK before I upgraded
I am tired to find out why this simple query not working. SELECT image_url
I'm not sure why this SQL query is not working. I'm new to SQL/PHP
I do not understand what is wrong with this query? Query tool does not
I am not able to execute this query getting ORA-00933: SQL command not properly
i have this query but this shows column does not exist SELECT p.content, (select
I have this query working but it is not returning back exactly what I

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.