$this->db->delete() does not work |
[eluser][email protected][/eluser]
post_model.php Code: public function delete_post() { post.php Code: <?php index.php Code: <?php foreach ($post as $post_item): ?> I have been just struggled to understand it like 5 hours straight... its just keep showing 404 page not found, while all the functions seem valid! What is the mistake here, can anyone point out for me? Will be really appreciated!!!!
[eluser]masrodjie[/eluser]
Please try using the following code: post_model.php Code: public function delete_post($pos_id) { post.php Code: public function delete($pos_id) { index.php Code: <?php foreach ($post as $post_item): ?>
[eluser][email protected][/eluser]
[quote author="masrodjie" date="1371141672"]Please try using the following code: post_model.php Code: public function delete_post($pos_id) { post.php Code: public function delete($pos_id) { index.php Code: <?php foreach ($post as $post_item): ?> Its not working still, 404 page not found still appears. Could you tell me how to trouble shoot this in this case? I am so frustrated lol
[eluser][email protected][/eluser]
I feel like there is something wrong with the fact that post/delete fucntion is not even triggered after click that url in view... What could be the issue?
[eluser]masrodjie[/eluser]
What's the URL generated for that anchor function? I am curious $del_id variable didn't give output
[eluser][email protected][/eluser]
[quote author="masrodjie" date="1371169069"]What's the URL generated for that anchor function? I am curious $del_id variable didn't give output[/quote] The url is mysite/post/delete/1 if the post deleting script I clicked is related to post id = 1. Its for some reason, the delete() in controller is not running, and I do not know what could be wrong. Thanks
[eluser][email protected][/eluser]
RESOLVED, its all about ROUTING Code: $route['post/delete/(:any)'] = 'post/delete/$1'; Its perfectly resolved enjoy guys! Vote up if you like it~ XD |
Welcome Guest, Not a member yet? Register Sign In |