CodeIgniter Forums
Little problem - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: Little problem (/thread-24130.html)

Little problem - El Forum - 11-01-2009

Hi all, I am start using CI and I am also a PHP beginner.

I am trying to create a simple database driven brochure web page.

Please tell me.
I would like to get number of displaying news from GET or POST varuables. How can I do this?

This is controller
function index()
        $data['limit'] = 10;
        $this->load->view('header', $data);
        $this->load->view('menu', $data);
        $this->load->view('left', $data);
        $this->load->view('frontpage', $data);
        $this->load->view('footer', $data);

I would like to change 1 number to $_GET['id'].
This is my view page code

$query = $this->db->get('news', $limit);
foreach ($query->result_array() as $row)
And I am trying to write my url like this
this shows me an error 404 page
Please correct me how can I mix get or post var and url and database code?

This url is working ok

Little problem - El Forum - 11-01-2009

I just would like to create a web which I can show a front page, and last few news in news page and other things.
I am really trying to study PHP + CI, I am a designer. help me please

Little problem - El Forum - 11-01-2009

I realise i should use uri segment and $this->db->insert function right?

Little problem - El Forum - 11-01-2009

You should read the user guide, especially:


Did you already watch the video tutorials?

Little problem - El Forum - 11-01-2009

Yes I had read and watched.
Now it's going fine, thank you.