Results 1 to 2 of 2

Thread: need PHP confirmation

  1. #1
    Join Date
    Jan 2005

    need PHP confirmation

    I have a PHP script that calls a PHP function, but I want a confirmation box to appear before the script is carried out. I'm seemingly incapable of meshing javascript and PHP, so is there a way to do it that I'm missing? Any help is appreciated.

  2. #2
    Join Date
    Aug 2004
    Remember that PHP is run on the server, JavaScript on the client. In most situations the PHP will be run, it sends the output (including any JavaScript) to the client, then the client executes the JavaScript. Therefore, your PHP script will be completely ignorant of anything the JavaScript is doing, and vice versa. The one exception would be if you did some sort of AJAX implementation, having JavaScript on the client calling a PHP (or other) script on the server, then altering the page output via the DOM based on the output received from the server. If that interests you, a web search on "AJAX PHP tutorial" should give you a few thousand hits.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center