Welcome Guest, Not a member yet? Register   Sign In
Call a function from an anchor
#2

[eluser]GSV Sleeper Service[/eluser]
well, you could create a method in your blog controller called 'delete_comment'
eg
Code:
...
function delete_comment($comment_id){
//some code to delete the comment
}
[code]
to call this, you construct a link like
[code]
<a href="blog/delete_comment/[comment_id]">delete</a>
but deleting stuff via 'get' (not strictly 'get' in this case, but acts very much like it) is a bad idea, you should really be POSTing your data to delete things.


Messages In This Thread
Call a function from an anchor - by El Forum - 01-26-2009, 11:19 AM
Call a function from an anchor - by El Forum - 01-27-2009, 03:43 AM
Call a function from an anchor - by El Forum - 01-27-2009, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB