09-11-2012, 02:44 AM
[eluser]kodkanyon[/eluser]
My problem is exactly this, even if i tried all the solutions there i couldn't get it work
http://thephpcode.com/blog/codeigniter/r...odeigniter
My problem is exactly this, even if i tried all the solutions there i couldn't get it work
http://thephpcode.com/blog/codeigniter/r...odeigniter
Code:
function kaydet(){
$form_kural = array(
array('field' => 'adi', 'label' => 'Sayfa Adı', 'rules' => 'trim|required|min_length[2]|max_length[255]|escape_str'),
array('field' => 'baslik', 'label' => 'Başlık', 'rules' => 'trim'),
array('field' => 'bloklar[]', 'label' => 'Bloklar', 'rules' => ''),
array('field' => 'gosterim', 'label' => 'Gösterim', 'rules' => ''),
array('field' => 'mdurum', 'label' => 'Sayfanın Durumu', 'rules' => ''),
array('field' => 'url', 'label' => 'Url', 'rules' => 'trim|required|min_length[2]|max_length[255]|escape_str|callback__urlkontrol')
);
$this->form_validation->set_rules($form_kural);
if ($this->form_validation->run() == FALSE)
{
$this->session->set_flashdata('error', $this->form_validation->_error_array);
// set_value('adi') posts info on screen
redirect('admin/pages/add','refresh');
}