[eluser]new developer[/eluser]
I have a problem saying session headers already sent. I worked the same code on Wamp but i installed Xampp recently. It gives me an error. My code is really simple as below. Can anyone please help me rectify this.
Code:
<?php
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index(){
$data['main'] = 'adminLogin';
$data['title']= 'Welcome to my first aplication';
$this->load->vars($data);
$this->load->view(dashboard);
}
function verifyMe(){
if($this->input->post('username')){
$u = $this->input->post('username');
$p = $this->input->post('password');
$this-> MAdmins-> verifyUser($u,$p);
if ($_SESSION['userid'] > 0){
redirect('admin/dashboard','refresh');
}
}
$this-> session-> set_flashdata(error , 'Login failed');
$this->load->view(adminLogin);
}
}
?>