title: make 1 button do two different function in controller php codeigniter
body: <p>i have one button in my form which supposed to insert the data into database and send the data as an email. so my question is can i separate the function in controller? i already tried to put both (insert into database and sending the data as an email) in only one function. it really looked messed up since the function i actually wanted to do is more than those 2. 
  <code>public function insertdata(){...}</code> 
  and <code>public function sendemail(){...}</code>
  maybe something like that.     </p>