Call a function from an anchor - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Call a function from an anchor (/showthread.php?tid=15097) |
Call a function from an anchor - El Forum - 01-26-2009 [eluser]Unknown[/eluser] Hey Guys Newbie here. I am trying to create a real basic web app using CI. I just followed Derek Jones Tutorial on building a basic blog. I would like to add the functionality for my own learning purposes of creating a basic delete comment function. I would also like to have an anchor link on the comment page that deletes the comment? How do I go about calling my delete_comment function from this anchor? And what is the simplest way to build a delete function? Thanks D :-) Call a function from an anchor - El Forum - 01-27-2009 [eluser]GSV Sleeper Service[/eluser] well, you could create a method in your blog controller called 'delete_comment' eg Code: ... Call a function from an anchor - El Forum - 01-27-2009 [eluser]Unknown[/eluser] Thanks. I will give that a go. I am fairly new to PHP and CodeIgniter. You mentioned using POST. How would it be done using POST? If that is a better way then I would very much like to know how its done. Thanks again D :-) |