if(!$u->save())
{
echo $u->error->string; //Example only
}
else
{
redirect('Success page'); //Example only
}
}
$data['u'] = $u;
$this->views->add_section('p_content','profiles/create',$data); //Load into view
}
*1 - Initialize the user object. This way my view code doesn't break when nothing is posted. Is this a good/bad idea? is there a better way? *2 - Create a property that is not in the table field. This is _solely_ for the purpose of repopulating the html form. Again, good or bad? is there a better way.. I know it doesn't throw up any errors and $u->save() will ignore it but still...
I don't think there's anything seriously wrong with the way I'm writing code ( will happily be proven wrong though! ) just not sure or confident its all that great..