• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set_value() problems

#11
[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

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');
}

#12
[eluser]michalsn[/eluser]
This is your problem:
Code:
redirect('admin/pages/add','refresh');

#13
[eluser]kodkanyon[/eluser]
So any idea how to solve it?

#14
[eluser]michalsn[/eluser]
Don't use redirects.
Just call your view file:
Code:
$this->load->view('your_view_file_for_admin/pages/add');

#15
[eluser]kodkanyon[/eluser]
The problem continues to Sad


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.