how to confirm delete in php without using js? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

how to confirm delete in php without using js?

cinfirm delete

13th Mar 2019, 8:20 AM
olbab omer
olbab omer - avatar
8 Antworten
+ 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