Welcome Guest, Not a member yet? Register   Sign In
Template Parser and form
#1

[eluser]Asinox[/eluser]
hi guys, im trying to use template parser, and i have a litter question about form and parser...

i want update a register, and i would like use parser for my template form, but how ill use parser if i'm rendering my form in this way:

Code:
<p>
    &lt;?php echo form_label('Nombre', 'nombre');?&gt;
    &lt;?php $data = array(
              'name'        => 'nombre',
              'id'          => 'nombre',
              //'value'       => {nombre},
            );

    echo form_input($data);
    echo form_error('nombre');    
    ?&gt;
</p>

so, in the value i want to set the data coming from the database... but... im getting error with parser in this place...

in this case i cant use parser?

thanks
#2

[eluser]Colin Williams[/eluser]
You are already using PHP, so why not just 'value' => $nombre, where $nombre is provided via the Controller? I don't see a need to introduce the parser into this. The parser + PHP don't play together too well




Theme © iAndrew 2016 - Forum software by © MyBB