Re: How do I use a confirm box to confirm before deletion from a database

From: Date: Mon, 28 Jan 2002 12:58:17 +0000
Subject: Re: How do I use a confirm box to confirm before deletion from a database
Groups: php.general 
Request: Send a blank email to php-general+get-82389@lists.php.net to get a copy of this message
When a user clicks upon a delete link that deletes a record from a database, I would like to be able to give them the option to OK or Cancel this action. I have tried coding the browsers built in confirm box (I can bring up this) but am unable to combine it with php or a combination of php and a javascript funtion
I've done something similar. Here is the code that I used: <?php echo "<a href=\"web_clients.php?type=delete&idClient=$idClient\" onclick=\"return confirm('Are you sure that you want to delete this client?')\">delete</a>" ?> HTH -jeff

« previous php.general (#82389) next »