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

[eluser]jabga[/eluser]
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
Code:
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

Code:
$query = $this->db->get('news', $limit);
foreach ($query->result_array() as $row)
And I am trying to write my url like this
Code:
http://localhost/CodeIgniter/index.php/welcome/blog?id=1
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
Code:
http://localhost/CodeIgniter/index.php/welcome/blog
#2

[eluser]jabga[/eluser]
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
#3

[eluser]jabga[/eluser]
I realise i should use uri segment and $this->db->insert function right?
#4

[eluser]pistolPete[/eluser]
You should read the user guide, especially:

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

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

[eluser]jabga[/eluser]
Yes I had read and watched.
Now it's going fine, thank you.




Theme © iAndrew 2016 - Forum software by © MyBB