www.webdeveloper.com
Results 1 to 2 of 2

Thread: need PHP confirmation

  1. #1
    Join Date
    Jan 2005
    Posts
    216

    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.
    dz_boy

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,338
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

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



Recent Articles