Hey there,
i am dealing with a “Invalid parameter number: parameter was not defined” i have triple checked the # of priamiters and their name, but that does not mean i am not missing something.
Here’s the block of code
$query = 'INSERT INTO users (
`email`,
`password`,
`dateJoined`,
`farmName`,
`limt_resutls`,
`level`,
`recive_email`,
`salt1`,
`salt2`
) VALUES (
:email,
:password,
:datejoined,
:farmname,
:limt_resutls,
:level,
:recive_email,
:salt1,
:salt2
) ';
$values = array(
'email' => $clean->text($_POST['email']),
'password' => $clean->text($_POST['password']),
'datejoined' => date('j-n-o'),
'farmname' => $clean->text($_POST['farmname']),
'limt_results' => '15',
'level' => '2',
'recive_email' => $_POST['reciveEmail'],
'salt1' => $salt['2'],
'salt2' => $salt['1'] );
try {
$insert = $pdo->prepare($query);
$insert->execute($values);
echo "Hello {$_POST['name']}, \
your account has been created! you can login with {$_POST['email']} and your correct password";
} catch (PDOException $e) {
echo "We could not insert the data into the database due to the error:: {$e->getMessage()}";
}