誰かが一行のデータのIDを取得してdelete.phpに渡す方法を教えてください。私はこれを行う方法を知らない、私は非常にこれに新しい.. tnxたくさん。 delete.phpでalertifyでIDを取得するにはどうすればいいですか?
while($row = mysqli_fetch_assoc($result))
{
echo $row['id'];
echo " ";
echo $row['name'];
echo " ";
echo "<form id='form' action='delete.php'>";
echo "<input type='button' value='submit' id='btn".$row['id']."' name='but'>";
echo "<br>";
echo "
<script>
$('#btn".$row['id']."').click(function() {
alertify.confirm('Delete the selected entry?',function(e){
if(e) {
$('#form').submit();
return true;
} else {
return false;
}
});
});
</script>
";
}
ロジックとHTMLをまず広げてください。 – mcklayin