Welcome Guest, Not a member yet? Register   Sign In
How would I put a session variable in to a form field value?
#1

[eluser]trinic[/eluser]
This doesn't work

Code:
value="<? php echo $this->session->userdata('user_first_name') ?>"

Also, before it's asked, yes it's a session variable. Would it be easier to pull it from the database?
#2

[eluser]helmy[/eluser]
Set the session variable to a variable in the controller and pass it to the view. Then try echoing it.
#3

[eluser]limit[/eluser]

You have a space in your php tag, is that a typo? Also you can use $this->output->enable_profiler(TRUE); in your controller to view session data. Make sure you initialize the session class $this->load->library('session');





Theme © iAndrew 2016 - Forum software by © MyBB