php - How to show a yes or no before deleting a record without using javascript? -


i want display message using php says want delete record ? yes or no. please

echo "<tr bgcolor='#cccccc'><td>$hometeam</td> <td>vs</td><td>$awayteam</td><td>$date</td><td>$venue</td><td><a href='fixtures.php?fixture_id=$fixture_id&edit=1' name='edit' >edit</a></td><td><a href='fixtures.php?fixture_id=$fixture_id&delete=1' name='delete'>delete</a></td></tr>"; 

in fixtures.php, have check delete field of $_get array , add confirmation. using php :

  if (! empty ($_get['delete']) && ! empty ($_get['fixture_id']) && empty ($_get['confirm'])) {    $fixture_id = intval($_get['fixture_id']);    echo "are sure want delete record ?<br />";    echo "<a href='fixtures.php?fixture_id=$fixture_id&delete=1&confirm=1'>yes</a> - "    echo "<a href='fixtures.php?fixture_id=$fixture_id'>no</a> - " } else if (! empty ($_get['delete']) && ! empty ($_get['fixture_id']) && ! empty ($_get['confirm'])) {  mysqli_query ("delete fixtures fixture_id=".intval($_get['fixture_id'])); } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -