code for php and codeigniter