[eluser]dhall[/eluser]
So I went with #3 as it appeared to be the easier option.
If test for rows and set the array just as you showed it.
I am now getting this error:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/profile.php
Line Number: 52 (this is the 'value' line below)
Code:
//set fields
$data['first_name'] = array (
'name' => 'first_name',
'id' => 'input_field',
'value' => set_value('first_name', $results->first_name),
'type' => 'text'
);
I get this error on every line where I have a $results->... when the db is blank.