PHP Delete ...
Posted: Fri Dec 09, 2011 6:59 pm
Just created my blog for a university assignment. Though I'm wondering how I would implement a delete function in the form of a button. i.e. "click a button to delete a specific blog entry". The blog itself is connected to a database, but I'm not sure how to do so. The following code allows the user to post a comment and also return the list of blog entries. Any ideas?
<form action=<?php echo "'blog_read.php?pid=".$_GET['pid']."'";?> method="post"> <p> <label for="user">NAME</label> <input type="text" name="user" id="user" /> </p> <p> <textarea name="body" rows="20" cols="60"></textarea> <!--<input type="hidden" name="valid_post_id" value="">--> </p> <p> <input type="submit" value="add comment" /> </p> </form> <form method="link" action="blog_list.php"> <input type="submit" value="Blog List"> </form>