Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Can you add the code for your first attempt, with the for-loop and the <form method="post">? That should work just fine - it's probably something small. Commented Feb 9, 2016 at 18:28
  • @Kenney it can't be,by logic,because all the forms have the same input name,and in the other page where the action goes,i tried to echo the $_POST['deletion'] it says,deletion undefined index. Commented Feb 9, 2016 at 18:31
  • Thanks. You'll need <form method='post' action='confirm.php'> - the default is get, which puts deletion in $_GET. You could also use $_REQUEST, and then it doesn't matter if it's POST or GET. Commented Feb 9, 2016 at 18:37
  • @kenny that actually was a test page code,in the main one i have put the method="post" which is why i mentionned it didnt work,my bad i will edit the post,but still doesnt solve anything though. Commented Feb 9, 2016 at 18:40
  • Ok, now, if you put this in your confirm.php, you'll see that deletion has a different value depending on which submit button you click: echo "<pre>" . print_r( $_POST, 1 ) . "</pre>"; Commented Feb 9, 2016 at 18:42