PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This is a bit of a mixed question. I have a line that adds a delete button to a form and I have an onClick procedure that confirms if the user wants to delete an article, how can I use PHP to code a statement so if they click OK it deletes the article from the database? Or have it link to a page like events.php?do=delete or call a function? Or do I absolutely have to use javascript? Here's my code:
if ($_POST['submit'] == 'Delete') {
// Delete code here
} elseif ($_POST['submit'] == 'Submit') {
// Normal form handler code here
} else {
// First time in, for not submitted
}