Jump to content

[SOLVED] PHP delete confirmation message


Recommended Posts

Is there a way in php to create a confirmation box when a user does something like delete a row from a database? I'm trying to get away w/o using javascript to pull this off, but I don't know if it's possible.  Right now I've just got it set up to delete when the link is clicked, but I don't find that to be a safe enough practice considering how easy it would be to screw up.  Any help would be appreciated.





Link to comment
Share on other sites

gerkintrigg & cmgmyr in one ;)


$query="SELECT * FROM table";
echo '<script language="javascript">alert("notification message goes here");</script>';



for confirm (example i found)

<script type="text/javascript">
function confirmation() {
var answer = confirm("Leave tizag.com?")
if (answer){
	alert("Bye bye!")
	window.location = "http://www.google.com/";
	alert("Thanks for sticking around!")
<input type="button" onclick="confirmation()" value="Leave Tizag.com">

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.