Welcome Guest, Not a member yet? Register   Sign In
Little problem

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

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

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

You should read the user guide, especially:

- http://ellislab.com/codeigniter/user-gui.../urls.html
- http://ellislab.com/codeigniter/user-gui...llers.html

Did you already watch the video tutorials? http://codeigniter.com/tutorials/

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

Theme © iAndrew 2016 - Forum software by © MyBB