Following from this tutorial..
http://net.tutsplus.com/articles/news/codeigniter-from-scratch-day-6-login/
I have successfully implemented and created/logged in users..
I have now added an additional input for the signup form;
signup_form.php
<?php echo form_input('sport', set_value('sport', 'sport?)')); ?>
In the logged in area I would like it to display the users data for ‘sport’
logged_in_area
I like <?php echo $this->session->userdata('sport'); ?>
In membership_model I have also added
'sport' => $this->input->post('sport'), in function create_member()
The data inserts into the database correctly! 🙂
It is just when they are logged in it doesn’t pull that user information from the ‘sport’ column. What have I done wrong? (I have this eerie feeling it’s the echo in the logged_in_area)
Thanks!
You have to manually set the value for
$this->session->userdata('sport');I think it is suited for you to add it with with something like
in
just after doing the insert into DB