how to confirm delete in php without using js? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to confirm delete in php without using js?

cinfirm delete

13th Mar 2019, 8:20 AM
olbab omer
olbab omer - avatar
8 Answers
+ 4
You could use links <?php if(!isset($_GET[”confirm”])) { ?> <a href=”?confirm”>Delete</a> <?php } else { ?> <a href=”delete.php”>Cannot be undone</a> <?php } ?>
13th Mar 2019, 11:57 AM
Toni Isotalo
Toni Isotalo - avatar
+ 2
//Delete things from databases or
13th Mar 2019, 9:17 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
//Still no clue what and where you want to delete
13th Mar 2019, 9:30 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
Use a form instead. You can cancel its submission by returning the results from confirm() function. <form onsubmit=”return submit()”> function submit() { return confirm(”This can’t be undone”); }
13th Mar 2019, 9:53 AM
Toni Isotalo
Toni Isotalo - avatar
0
when click user on delete link in the the browser
13th Mar 2019, 9:23 AM
olbab omer
olbab omer - avatar
0
i have link that delete picture from database and sometime ftom folder using mysql query and php unlink function i want say to user if you delete this can not be undone sorry about my english is not good
13th Mar 2019, 9:41 AM
olbab omer
olbab omer - avatar
0
you mean confirm function of js?
13th Mar 2019, 10:00 AM
olbab omer
olbab omer - avatar
0
what if javascript disabled in client side?
13th Mar 2019, 10:42 AM
olbab omer
olbab omer - avatar