Welcome Guest, Not a member yet? Register   Sign In
Problem with redirect
#1

[eluser]Unknown[/eluser]
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:

Code:
public function validate_data()
{
$query = $this->login_model->validate();
if($query) //credenciales validadas
{
$data = array( 'username' => $this->input->post('username'), 'is_logedin' => true );
$this->session->set_userdata($data);
redirect('menu/index', 'refresh');
}
else
{
$this->load->view('sieapp/forgot_pass');
}
}

and this is for menu controller:

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

Thanks for the help.
#2

[eluser]jprateragg[/eluser]
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.
#3

[eluser]Unknown[/eluser]
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?
#4

[eluser]jprateragg[/eluser]
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




Theme © iAndrew 2016 - Forum software by © MyBB