how can i appear confirm message box when row are delete (are you sure to delete this record) in php??

echo '<td><a href="teachers_delete.php?Course_Id=' . $row['Course_Id'] .'" ><img src="images/delete.gif" /></a></td>';

Do you want to do this in PHP (needs a separate page), or use a javascript popup ?

echo '<td><a onclick="return confirm(\'Are you sure want to delete?\');" href="teachers_delete.php?Course_Id=' . $row['Course_Id'] .'" ><img src="images/delete.gif" /></a></td>';

i want to use javascript popup..

Member Avatar


Are you using sessions or a way of protecting your images from malicious deleters?

The js confirm popup is an ugly horrible thing, without a nice way to set the popup title. If you're looking for something a little prettier, search the site, or there are loads of other ui widgets out there.