Welcome Guest, Not a member yet? Register   Sign In
Global Includes?
#3

[eluser]SplashCreativity[/eluser]
That worked perfectly, just for anybody who doesn't understand and may be experiencing the same problem.

1. I created a new file: /system/application/helpers/login_helper.php
2. Added the code for the file in a function.

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

function get_form()
{
    $header['email'] = array(
        'name'      =>    'email',
        'value'     =>    'Adresse email',
        'class'     =>    'menu_input',
        'onClick'    =>    'this.value=\'\''
    );
    
    $header['password'] = array(
        'name'      =>    'password',
        'value'     =>    'Mot de passe',
        'class'        =>    'menu_input',
        'onclick'    =>    'this.value=\'\''
    );
    
    $header['submit'] = array(
        'name'        =>    'submit',
        'value'        =>    'Connexion',
        'class'        =>    'menu_submit'
    );
    
    $header['register'] = array(
        'name'        =>    'register',
        'content'    =>    'Joindre',
        'class'        =>    'menu_submit',
        'onClick'    =>    'location.href=\'register\''
    );
    
    return $header;
}

?>

3. I edited my autoload.php to include the helper 'login'

4. In my controller I used the code
Code:
$header = get_form();
$header['title'] = "Auto Jantes";
$header['keywords'] = array("Auto", "Jantes");
$header['description'] = "Development Website";

Take notice of the get_form (because I returned the $header variable in my function, it added the variables to my $header variable in my controller)

Thank you very much stuffradio

Regards
Stephen


Messages In This Thread
Global Includes? - by El Forum - 06-03-2008, 02:14 PM
Global Includes? - by El Forum - 06-03-2008, 03:04 PM
Global Includes? - by El Forum - 06-03-2008, 03:17 PM
Global Includes? - by El Forum - 06-03-2008, 03:19 PM
Global Includes? - by El Forum - 06-04-2008, 02:44 AM
Global Includes? - by El Forum - 06-04-2008, 03:02 AM
Global Includes? - by El Forum - 06-04-2008, 03:11 AM
Global Includes? - by El Forum - 06-04-2008, 06:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB