first thank you for solving privious problems.
I am working on codeigniter . i am making signup form in which countries dropdown list is required. i am unable to make this drop down list with table country in my database.Can any one help me.
daniel36
-7
Light Poster
Recommended Answers
Jump to PostFirst of all remember to use CODE to wrap data you post in the forums.
Second: this is wrong$this->db->select('id','country_name');
you should write$this->db->select('id, country_name');
otherwise country_name will be seen as second argument.Check if this solves the problems. Bye.
Jump to PostChange the controller function with this:
function index() { $this->load->model('user'); $this->load->helper(array('form','url')); $data['country']=$this->user->country(); $this->load->view('signup_view',$data); }
If you load the view before you collect data you will get an error, and you need also to send data array to the view, so you need to use a second parameter …
All 8 Replies
daniel36
-7
Light Poster
cereal
1,524
Nearly a Senior Poster
Featured Poster
daniel36
-7
Light Poster
cereal
1,524
Nearly a Senior Poster
Featured Poster
daniel36
-7
Light Poster
cereal
1,524
Nearly a Senior Poster
Featured Poster
daniel36
-7
Light Poster
wesley1263
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.