Welcome Guest, Not a member yet? Register   Sign In
sessions not enabled on go daddy server
#21

[eluser]cahva[/eluser]
Uh.. Thats a lot of information. I cant tell you whats wrong. One thing that really caught my eye is that you are not sticking to MVC implementation and for some reason you are not using CI's database to handle database related things and use straight mysql_query() etc. in views. Why? You should move database related things to models(and really use CI's database class), fetch them in controllers and then pass the information to views.

To find out if your sessions are working or not, create a test controller named test.php to application/controllers:
Code:
<?php

class Test extends Controller {

    function __construct()
    {
        parent::__construct();
        $this->load->library('session');
    }
    
    function index()
    {
        $this->session->set_userdata('test','Just a test');
        redirect('test/session_test');
    }
    
    function session_test()
    {
        if ($this->session->userdata('test'))
        {
            echo 'Session "test" is "'.$this->session->userdata('test').'"';
        }
        else
        {
            echo 'Session test failed!';
        }
    
    }
}

Then go to your site for example:
http://www.yourdomain.com/test

That should set session and redirect you to session_test method and you should see if it works or not.




Theme © iAndrew 2016 - Forum software by © MyBB