Hello guys,
this is my first thread here in the CodeIgniter forum because I've started to develop my website with this fantastic framework since just 1 month. My learning curve is growing really fast but there are some issues that currently I'm not able to solve and I need your support.
With the aim to create a dynamic website, I've created a controller named "rigatos" with inside a method named "cucuru".
PHP Code:
public function cucuru() {
$this->load->view('templates/header');
$this->load->view('templates/footer');
}
What I want to do is to have the same content of the "cucuru" method also for other methods, without the need to write other methods.
What I have in mind is to create a table in my MySQL database (the name of the DB is "dork", the name of the table is "ogartab"). What I don't know is how to do this thing in the routes.php.
What I know is that, if I write:
$route['rigatos/carl'] = "rigatos/cucuru";
if I digit "localhost/rigatos/carl" the browser shows me the "localhost/rigatos/cucuru" page so it's ok.
Now, what I'm trying to do is that typing "localhost/rigatos/bat" the browser should show me the content of "localhost/rigatos/cucuru".
How can I do this? Do you have some suggestions?
Thanks for your help.