[PHP-DB] Run SQL query when click on OK button of warning message

2008-07-27 Thread Nasreen Laghari
Hi All, I am printing a _javascript_warning message. On pressing OK button, I want to run an sql query. Below is the way I have tried but sql query is running either press OK or Cancel button on warning message or even refresh the page (F5). Also redirection, when press OK, also not working.

RE: [PHP-DB] Run SQL query when click on OK button of warning message

2008-07-27 Thread Emiliano Boragina
Hi, Why the “if(answer){” is not in the tag ?php? + _ // Emiliano Boragina _ // Diseño Comunicación // + _ // [EMAIL

Re: [PHP-DB] Run SQL query when click on OK button of warning message

2008-07-27 Thread sempsteen
It seems you've a long way to go. Here is what i can say for you. First of all PHP and JavaScript are two different programming languages, running in different environments. JavaScript is a client-side language which your browser interprets it with the page is loaded. PHP is a server-side language

Re: [PHP-DB] Run SQL query when click on OK button of warning message

2008-07-27 Thread Micah Gersten
While sempsteen is correct, you can achieve the correct effect in this simple scenario by checking the return value of the confirm button. input type=submit value=Delete Record onsubmit=return confirm ('Are you sure you want to delete this record!!'); / And then check for the submit... This is