[eluser]Adnan1984[/eluser]
Hello,i am using codeigniter version 2.1.2 and i have a little bit problem with variable.
here is my code:
In Controllers
Code:
class Site extends CI_Controller {
public function create_user(){
........................
........................
$data['success'] = 'successfully submitted!';
if($this->form_validation->run()== FALSE){
$this->load->view('test_view');
}else{
$this->load->model('get_model');
$this->get_model->user_insert();
$this->load->view('test_view',$data);
}
}
}
In Views
Code:
........................
........................
<?php echo $success; ?>
........................
........................
I got error message and it says:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined variable: success
Filename: views/test_view.php
Line Number: 85
Can you solve this problem?
Thanks