PHP and JavaScript
Hi, Im Trying to use PHP and JavaScript and I would like some help.
I would like to show a Message Box (Confirmation YES/NO) when the user click on the href, if the user answer is YES, then execute this code PHP Code:
Thanks for your help.. |
That doesn't work.
JavaScript is run on the users machine, while PHP code is run on the server. So your PHP code is run before the yes/no decision is made by the user. |
Thanks, how can you suggest me to ask the decision before redirecct to the other webpage?
|
Hmm, I would suggest you to make a confirmation page using PHPand HTML forms.
Otherwise you can't do that, I think. HTH |
Yes, you make a html form with Javascript confirmation box triggered onSubmit and php code, which will be run if user confirms the confirmation box.
|
All times are GMT -5. The time now is 04:18 PM. |