Welcome Guest, Not a member yet? Register   Sign In
set_flashdata() returning false?
#1

[eluser]chadsaun[/eluser]
I'm trying to use set_flashdata() but its returning false. Here is how I'm calling it...
Code:
$this->session->set_flashdata('error', 'Your username and password were incorrect.') or die("Couldn't set flashdata.");

Why would this output "Couldn't set flashdata" ? I've autoloaded the session library.
#2

[eluser]pistolPete[/eluser]
set_flashdata() isn't returning anything:
Code:
/**
     * Add or change flashdata, only available
     * until the next request
     *
     * @access    public
     * @param    mixed
     * @param    string
     * @return    void
     */
    function set_flashdata($newdata = array(), $newval = '')
    {
        if (is_string($newdata))
        {
            $newdata = array($newdata => $newval);
        }

        if (count($newdata) > 0)
        {
            foreach ($newdata as $key => $val)
            {
                $flashdata_key = $this->flashdata_key.':new:'.$key;
                $this->set_userdata($flashdata_key, $val);
            }
        }
    }
#3

[eluser]chadsaun[/eluser]
Yah you're right.

I restarted my browser and it works fine now.

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB