Quisiera actualizar una fecha que tengo al presionar un botón, intenté con esto pero no me funciona:
   Código PHP:
    if(isset($_POST['3meses'])){
      $fechavencimiento = mysql_real_escape_string($_POST['fechavencimiento']);
      if(!empty($fechavencimiento)){
      $query3mes= mysql_query("UPDATE empresas SET fechavencimiento = date_add(fechavencimiento,interval 1 year) where id = ".$mostrarvencimiento['id']." ");
      if($query3mes){
        echo "<script>alert('Esta Bien')</script>";
      }
      else{
        echo "<script>alert('Esta mal')</script>";
      }
    }
    }
    $results = $sentence -> fetchAll();{
         while($mostrarvencimiento = mysql_fetch_array($mostrarfecha))
         {
 
            echo'
              <tr>
                <td>Id: '.$mostrarvencimiento['id'].' / IdE: '.$mostrarvencimiento['idestado'].'</td>
                <td>'.$mostrarvencimiento['fechavencimiento'].'</td>
                <td><form method="post" action="porcaducar"><input type="submit" value="1 año" name="3meses" id="3meses"></td></form>
              </tr>
            ';
        }
    } 
    
  Se que no debe ser mucho el problema pero no encuentro la forma, gracias..