Js Alert with PHP conditional?

Karl R

New member
I'm struggling with a concept at the moment, with the web application that I'm building. A user can delete content they have uploaded by clicking a "delete" button, I would like a JS alert box to appear onClick asking them if they are sure. Then I would like to use a php conditional such as if($_POST['sure'] == 'yes') { //Mysql delete etc } else { //Do nothing } I'm not sure if im barking up the wrong tree here, but thanks for anyone who helps anyway - Karl.
 
Back
Top