Merci ça va déjà m'aider mais en fait je me suis mal exprimé (désolé) mais le problème est plus en amont : je ne trouve pas comment récupérer les données envoyées par le formulaire, les données de type $_POST. C'est à cause de ça que je n'arrive pas à écrire dans la base de données en fait.
J'arrive pas à comprendre ce morceau de code :
$this->post_data = array(
array('field' => 'u_nickname', 'insert' => TRUE),
array('field' => 'u_tpl', 'insert' => TRUE),
array('field' => 'u_language', 'insert' => TRUE),
array('field' => 'u_birthday', 'insert' => TRUE),
array('field' => 'u_birthday_day', 'insert' => FALSE),
array('field' => 'u_birthday_month', 'insert' => FALSE),
array('field' => 'u_birthday_year', 'insert' => FALSE),
array('field' => 'u_sexe', 'insert' => TRUE),
array('field' => 'u_rank_id', 'insert' => TRUE),
array('field' => 'u_utc', 'insert' => TRUE),
array('field' => 'u_utc_dst', 'insert' => TRUE),
);
foreach ($this->post_data AS $value)
{
$this->data[$value['field']] = request($value['field'], 'post');
if ($this->data[$value['field']] === NULL && $value['insert'])
{
$this->data[$value['field']] = $user->data[$value['field']];
}
$this->data[$value['field']] = trim($this->data[$value['field']]);
}
D'où ça vient 'field' et comment je peux faire de même pour mes données ?