Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] View losing CSS Style after login validation fails.

So, this is the header of my login_view.php.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html xml:lang="en" lang="en"&gt;
        &lt;title&gt;Login SINUS 2012&lt;/title&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt;
        &lt;base href="&lt;?=base_url();?&gt;" /&gt;
        &lt;link rel="stylesheet" type="text/css" href="css/default2.css"/&gt;

My controller have this code in it:


class Login extends CI_Controller{

function index(){

function validate_credentials(){

  $query = $this->membership_model->validate();
  if($query){ //Se as credenciais forem validadas

   $data = array(
    'username' => $this->input->post('username'),
    'is_logged_in' => true
When I point my browser to:
the page is displayed without problem, the CSS Style and images are linked.

But, if I just click on Login, without typing my credentials the page loses all its styles and images.
After the failed authentication my browser points to:

I gess that that has something to do with it.

My base_url is set to http://localhost/code/, that is pointing to C:\wamp\www\code.

My css and img files are inside C:\wamp\www\code\css and C:\wamp\www\code\img.

Thanks for the help, guys!

Messages In This Thread
[SOLVED] View losing CSS Style after login validation fails. - by El Forum - 01-07-2012, 08:36 PM

Theme © iAndrew 2016 - Forum software by © MyBB