How to establish blog post id and delete? |
[eluser]Unknown[/eluser]
Hey Guys I apologise for this question in advance as most of you guys probably find it insultingly obvious but I have the following code from Derek Jones 20 min Blog tutorial. Code: <?php I am trying to learn more by adding some extra functionality. As you can see I want to add a delete_post function. I am not sure how to do this however. I have guessed that the syntax should be something like this: Code: function delete_post() but I am not sure what should go inside the brackets? If anyone could help me that would be great. Thanks guys. D :-)
[eluser]OES[/eluser]
Ok this obviously is a simple example but it will help get you going. You are going to need to pass the ID of the post you want deleting so this is a basic example to delete that post. Code: function delete_post($id) Like i said simple but I hope it helps. It does show this in the manual. http://ellislab.com/codeigniter/user-gui...tml#delete Good luck and welcome to CI |
Welcome Guest, Not a member yet? Register Sign In |