Welcome Guest, Not a member yet? Register   Sign In
help with date helper please
#1

[eluser]slothdog[/eluser]
hey all...

im getting this error:

Fatal error: Call to undefined function: standard_date()

except from controller:

Code:
## LOAD HELPERS
    $this->load->helper(array('form', 'url','date'));

function submitdata()
    {
        ## TIME AND DATE
        $format = 'DATE_RFC822';
        $time = time();
        $signupdate = standard_date($format, $time);        
    }

## SET DATA TO PUT IN DATABASE
        $data = array(    
        'rules_agree'         =>    $_POST['rules_agree'],    
        'signupdate'        =>    $signupdate
    );


$this->db->insert('registration', $data);

could you help me figure out what im doing wrong?

thanks!
#2

[eluser]Pascal Kriete[/eluser]
I assume those are three separate code snippets. Are you loading the helpers in the constructor?
#3

[eluser]slothdog[/eluser]
yeah thats 3 badly edited snipits (sorry) and no im not. i always forget to do that.

EDIT: adding the helpers to the constructor fixed the problem. thanks.




Theme © iAndrew 2016 - Forum software by © MyBB