set_value() default in Code Igniter

johnwilliams

New Member
I've used formigniter to generate a form for CI. http://formigniter.org/That bit works great. However I want to set a default value for the name field.The input code looks like this:\[code\]<label for="forename">Forename</label><?php echo form_error('forename'); ?><br /><input id="forename" type="text" name="forename" maxlength="255" value="http://stackoverflow.com/questions/3873601/<?php echo set_value('forename'); ?>" />\[/code\]and I'd want to add in the first name with \[code\]$this->session->userdata('current_client');\[/code\]Will it break my database insert if I just drop it into the set_value function?Thanks :)Edit:Sorry I don't think I was very clear there. I want the name field to be automatically filled in with the name from the session cookie.
 
Back
Top