Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given?
It seems that you have a missing parameter, you should have 13 parameters and 13 ?
check the two parameters after password. (I took out signupdate
) try the below :
$stmt = mysqli_prepare(
$db_conx,
"INSERT INTO $storenameTable (firstname, lastname, username, address_1, address_2, postcode, country, county, city, email, password, storeShop) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
);
//after validation, of course
mysqli_stmt_bind_param($stmt, "issi", $firstname, $lastname, $username, $address_1, $address_2, $postcode, $country, $county, $city, $email, $hashedPass, $storenameTable);
mysqli_stmt_execute($stmt); <//<<<<<<<< line 92
if (mysqli_affected_rows($db_conx)) <//<<<<<<<< line 93
{
mysqli_stmt_close($stmt); <//<<<<<<<< line 96
//update was successful
$id = mysqli_insert_id($db_conx);
}
You also can get more details on the last error by using var_dump(mysqli_error($db_conx));
fixing mysql errors mysqli_stmt_bind_param()
I think that you might have problem in your connection file mysqli_connect.php
Here is my code for your reference
define("DB_HOST", "localhost");
define("DB_USERNAME", "username");
define("DB_PASSWORD", "password");
define("DB_NAME", "database name");
$dbc = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
With this connection parameters I've executed your code and its working.
Also please change the line echo mysqli_error();
to echo mysqli_error($dbc);
The mysqli_error accepts one parameter which is the connection link.
Update Statement Error with MySQLi
$query_task_update = "update tasks set display_order=? where task_id=?";
$stmt_task_update = mysqli_prepare($dbc, $query_task_update);
mysqli_stmt_bind_param($stmt_task_update, "ii", $display_order, $last_task_id);
mysqli_stmt_execute($stmt_task_update);
Related Topics
Is There Any Sort of "Pre Login" Event or Similar
Hide Variation Info from Cart Item Title in Woocommerce 3+
Concatenate Values of N Arrays in PHP
Undefined Index with PHP Sessions
Tactics for Using PHP in a High-Load Site
Session Timeouts in PHP: Best Practices
Remove All Non-Numeric Characters from a String; [^0-9] Doesn't Match as Expected
Setting a PHP $_Session['Var'] Using Jquery
Run a Ffmpeg Process in the Background
Yii2 Translation Does Not Work
3Rd Party Dependency Conflict in Developing Wordpress Plugin
Using Fetch_Assoc on Prepared Statements
Jquery: Running Ajax Locally Without a Webserver
MySQL Encryption/Storing Sensitive Data,