[eluser]zenon[/eluser]
I wonder, what could be the best way to:
1-get a result from db
2-put result in input form
Using form helper, I build an input text in this way:
Code:
$data = array(
'name' => 'username',
'id' => 'username',
'value' => $user_info[0]->name,
'maxlength' => '100',
'size' => '50',
'style' => 'width:50%',
);
but if user_info return no record, code will result in error.
It might be useful to always initialize user_info with 1 empty result, but I wonder if there's a better way.
Any suggestions?
PS
I would like to use smarty template and I got the code from coolphp site but I've noticed some bugs.
Anyone here's knows other parser template engine easily integratables with CI ?
(I tried internal CI parser but I would like to use something more powerful)