hahaha well I am getting a tiny little error inside the input text telling me that I have an error on line 259 I can only see 259 in the field because it is size=3. If I would have been a bit intelligent I could have made the size of the field bigger to read the error.... I will go do that and get back to you on that. as for the [$sin1] from what I understand of reintegrating values into the 3 input field that compose the whole social insurance number I have saved the exploded array and save each element in a distinct variable since I have three field to fill as in like my prototype example. What I have problem wrapping my head around is the original values that I type in S1, S2 and S3 and concatenated into one variable $sin and stored inside my database. The way I look at it I can't use $sin as a variable to reintegrate the values back into the input fields because it somehow doesn't' make any sense even if I don't understand why at this point, my gut feeling I guess. So now, in my user class where the update query is happening. I only have and update for $sin. Should I also include $sin1, $sin2, $sin3?
EDIT_____________________________
The error I am getting is: <br /><b>Notice</b>: Undefined index: $sin11 in <b>C:\xampp\htdocs\lar\settings.php</b> on line <b>259</b><br />
The line in my form where I tried inserting the uncooperative variable lol
Code: Select all
public function update_user($first_name, $middle_name, $last_name, $gender, $dob, $sin, $bio, $image_location, $id){
$query = $this->db->prepare("UPDATE `users` SET
`first_name` = ?,
`middle_name` = ?,
`last_name` = ?,
`gender` = ?,
`dob` = ?,
`sin` = ?,
`bio` = ?,
`image_location`= ?
WHERE `id` = ?
");
$query->bindValue(1, $first_name);
$query->bindValue(2, $middle_name);
$query->bindValue(3, $last_name);
$query->bindValue(4, $gender);
$query->bindValue(5, $dob);
$query->bindValue(6, $sin);
$query->bindValue(7, $bio);
$query->bindValue(8, $image_location);
$query->bindValue(9, $id);
try{
$query->execute();
}catch(PDOException $e){
die($e->getMessage());
}
}
and the function call? do I pass the $sin1,2,3 in there too?
Code: Select all
$users->update_user($first_name, $middle_name, $last_name, $gender, $dob, $sin, $bio, $image_location, $user_id);
header('Location: settings.php?success');
exit();
you know, I'm really-really new at this but with your help I am starting to understand concepts that I never did before and I want to thank you for that.