I have just finished creating my signup form and now ready to insert data into the datebase using doctrine. Everything inserts fine but in my var_dump my birthday dropdown is in 3 seperates… day , month and year.. I would like to combine them and post as “birthday” into the db with doctrine.
I wish to do this in my controller, please take a look at my code and you’ll see where I want to place this code.
My code:
public function submit() {
$u = new User();
$u->first_name = $this->input->post('first_name');
$u->last_name = $this->input->post('first_name');
$u->email = $this->input->post('email');
$u->password = $this->input->post('password');
//day
//month
//year
$u->sex = $this->input->post('sex');
$u->save();
$this->load->view('submit_success'); // temporary account area page
}
}
For those who come across this hurdle was the solution for me:
This inserted what was selected in my form using the drop down date select into my db.