<?php
$kaydelatename = $_POST["gmkay"];
$dlkey = $_POST["keydelate"];
if(isset($dlkey)){
mysqli_query($link, "DELETE FROM kays WHERE kayname = '$kaydelatename'");
}
?>
<form method="POST">
<textarea name="gmkay" class="form-control" id="inputPassword" rows="8" placeholder="Ключ"></textarea>
<button name="keydelate" type="submit" class="btn btn-secondary">Удалить</button>
</form>
<?php
$kaydelatename = $_POST["gmkay"];
$dlkey = $_POST["keydelate"];
if(isset($dlkey)){
mysqli_query($link, "DELETE FROM kays WHERE kayname = '$kaydelatename'");
}
?>
<form method="POST">
<textarea name="gmkay" class="form-control" id="inputPassword" rows="8" placeholder="Ключ"></textarea>
<button name="keydelate" type="submit" class="btn btn-secondary">Удалить</button>
</form>