• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with redirect

Hello, im doing a login and when i validate the user data show a white screen, im using redirect to call (menu/user_form) menu class and user_form function.

this is the code of my login controller:

public function validate_data()
$query = $this->login_model->validate();
if($query) //credenciales validadas
$data = array( 'username' => $this->input->post('username'), 'is_logedin' => true );
redirect('menu/index', 'refresh');

and this is for menu controller:

class Menu extends CI_Controller
public function index()
$data['title'] = 'menu';
$this->load->view('sieapp/menu_form', $data);

Thanks for the help.

What exactly is the problem? Are you getting an error on your page? Is it not redirecting? Is there anything on the PHP log? We need some more details before we can help you.

This is the error that shows the console in chrome:
"Not allowed to load local resource: file:///C:/xampp/htdocs/CodeIgniter/index.php/menu"

In my login controller i made a redirection to the menu class when the user data are validated, but shows me a white screen and the error above, how can i check the PHP log or enable?

Open your php.ini file and locate the parameter "error_log". Notice the location, go back to your problematic controller/method, rerun it, then go check the PHP log. It will list errors. Also make sure the following are set in your php.ini:

display_errors = On
error_reporting = E_ALL

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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