In your insert, are 8 columns and only 7 binds
1 2 3 4 5 6
INSERT INTO user(first_name, last_name, email, password, bio, location,
7 8
industry,salt)
VALUES(?,?,?,?,?,?,?,?)
1 2 3 4 5 6 7 8
The binds, is missing one, propably the salt
1234567
mysqli_stmt_bind_param($stmt, 'sssssss',
1 2 3 4 5 6 7
$fname, $lname, $password, $email, $bio, $location, $industry) or die("bind param");
the numbers of s, columns and variables must be the same, in this case 8. To fix just add one s
and $salt
at bind_param()
, like this:
mysqli_stmt_bind_param($stmt, 'ssssssss', $fname, $lname, $password, $email, $bio, $location, $industry, $salt) or die("bind param");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…