I have a simple form the shows entries from a mysql db, each entry has a group of radio buttons - hide, show and delete. As my code stands now , nothing happens when i submit the form.

here is my form code

```
<form class='removeform' action='advertremoveedit.php' method='post'>
  <?php
  include '../inc/connect.php';
  $q = mysqli_query($link, "SELECT * FROM adverts ORDER BY id ASC");
  while($row = mysqli_fetch_array( $q )){
    echo"<input type='radio' name='edit[{$row['id']}]' value='remove'>Remove";
    if ($row['status'] ==  1){
      echo"<input type='radio' name='edit[{$row['id']}]' value='hide'>Hide";
    }
  }
    echo"<input type='submit' name='submit' value='Submit' />";
  ?>
</form>

```

And here is the php to handle the form

```
if(isset($_POST['remove'])){
  $chk = (array) $_POST['remove'];
  $p = implode(',',array_keys($chk)); 
  $t = "SELECT * FROM adverts WHERE id IN ($p)";
  $result = $link->query($t);
  $url=mysqli_fetch_array($result);
  $image=$url['file']; 
  if ($result){
    unlink($image);
    $q = "DELETE FROM adverts WHERE id IN ($p)";
    $delete = $link->query($q);
  }
}

//if hide was clicked, change `status` to 1
if(isset($_POST['show'])){
  $edit= $_POST['show'];
  $chk = (array) $_POST['show'];
  $p = implode(',',array_keys($chk)); 
  $t = "SELECT * FROM adverts WHERE id IN ($p)";
  $result = $link->query($t);
  if ($result){
    $q = "UPDATE adverts SET status = 1 WHERE id IN ($p)";
    $show = $link->query($q);
  }
}

```

Edit..submit code

```
 if(isset($_REQUEST['edit'])){
    if($val=="hide"){
      $chk = (array) $_POST['hide'];
      $p = implode(',',array_keys($chk)); 
      $t = "SELECT * FROM adverts WHERE id = ($p)";
      $result = $link->query($t);
      if ($result){
        $q = "UPDATE adverts SET status = 2 WHERE id = ($p)";
        $hide = $link->query($q);}}}

```