php - Delete confirmation link -


this question has answer here:

echo '<td><a href="candidates.php?id=' . $row['candidate_id'] . '">delete candidate</a></td>'; 

how can add confirmation message before data deleted? asking sure

try

echo '<td><a href="candidates.php?id=' . $row['candidate_id'] . '" onclick="return confirm('are sure...?')">delete candidate</a></td>'; 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -