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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:21:15+00:00 2026-06-15T19:21:15+00:00

Code: $stmt->bind_param(s, md5($input[‘user’] . $config[‘salt’])); PHP Error Message: Only variables should be passed by

  • 0

Code:

$stmt->bind_param("s", md5($input['user'] . $config['salt']));

PHP Error Message:

Only variables should be passed by reference

I’ve been working on this project but I am stuck now. I am new to PHP. What to do?

  • 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-15T19:21:16+00:00Added an answer on June 15, 2026 at 7:21 pm

    Thanks for using MySQLi prepared statements! They’re a pain, but it’s worth it.

    bind_param takes values by reference. It does this by looking at the variable you’re passing and pointing at the innards directly.

    In your call, you’re returning the string result of a function call – md5 in this case. Because there’s no variable involved, there are no innards to point to. PHP is whining about not being able to pass the data by reference as a result.

    You will need to stick the result of the function call into a variable, then pass that variable into the bind instead.

    BIG FAT WARNING! md5 is not a secure hash any longer, and should not be used to store passwords. When you get the chance, you should update to a better hash format, such as bcrypt, PBKDF2, scrypt, etc.

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

Sidebar

Related Questions

I am having an error in mysql and php My code: $stmt->prepare(INSERT `tablename` (col1,col2,col3)
Code: String message = MessageFormat.format(error {0},e); E.g. message: java.text.ParseException: Unparseable date: sdf sf sa
Here's my code $stmt = $conn->mysqli->stmt_init(); $stmt = $conn->mysqli->prepare('SELECT Username, EmailVerified, Blocked FROM user
For this Java code: stmt.addBatch( INSERT INTO Bills (BillDateTime, Table, Item, NoAttended, Service, Payment,
I have this code, but i cant make it work: images = Image.find_by_sql('PREPARE stmt
Code: <?php //initializing script, do not modify session_start(); define('IN_SCRIPT', true); //so that global.php cannot
Getting an error with my code found HERE ... Which is a culmination of
I have the following function in the php script, public function createPorductstatushistory($item) { $stmt
I have a php code below where it inserts questions and answer: <?php var_dump($_POST);
I have the following code, for which I get the error: Warning : mysqli_stmt::bind_result()

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.