[eluser]noideawhattotypehere[/eluser]
[quote author="Scared" date="1390226886"][quote author="noideawhattotypehere" date="1389946186"]
Code:
class Example extends CI_Controller {
public function example_deletion($id) {
//deletion code... and whatever you want
}
}
Then you access it like:
yourdomain.com/example/example_deletion/$id,
if you had more arguments in your method, it would look like
yourdomain.com/controller/method/$arg1/$arg2/... etc.,
but if you wanna keep it with GET approach you access it via
Code:
$this->input->get('name_of_your_get_value');
[/quote]
Sorry, newbie question, am I right in thinking you have to setup the routing accordingly for this to work? What would the routing rule look like? Would it be this?:
Code:
$route['example/example_deletion/(:any)'] = 'example/example_deletion/$1';
[/quote]
You could setup other route if you want in routes.php, but by default codeigniter urls looks like this:
base_url/controller/method/param1/param2/.../
this means that your example doesnt need any entries in routes.php