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>';

Recommended Answers

All 5 Replies

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 for diafol

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 jqueryui.com site, or there are loads of other ui widgets out there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.