gdebojyoti.mail96
Member
- Messages
- 89
- Reaction score
- 0
- Points
- 6
I am trying to create automatic delete buttons for every post in my site.
For that, I am using the following line of code inside a while loop. It prints every post stored in the database along with a "Delete post" button.
But whenever I am clicking on any "Delete post" button, the deletepost.php shows the following output:
Please note that the details of the 1st "status" stored in my SQL table are:
I cannot understand what to do in order to rectify this error. Please help me.
Regards.
For that, I am using the following line of code inside a while loop. It prints every post stored in the database along with a "Delete post" button.
Code:
echo($getStat['statusUpdate']." (<font face='verdana' size=2px> ".$getStat['time']." </font>) <form method='post' action='deletepost.php'><input type='hidden' name='postid' id='postid' value='".$getStat['statusID']."'><input type='submit' value='Delete post'>");
Here the ID is always displayed as 1, irrespective of the particular statusID I selected. And the post is always "Hello world!" instead of the corresponding post.Are you sure to delete the following post?
ID=1
Post=Hello world!
Please note that the details of the 1st "status" stored in my SQL table are:
statusUpdate = Hello world!
statusID = 1
I cannot understand what to do in order to rectify this error. Please help me.
Regards.