Re: PHP opening in new window and shouldn't

Discussion in 'PHP' started by jwpryor, Feb 5, 2007.

  1. #1
    We have successfully been using Adobe Authorware to call a php file that retrieves and writes to a MySQL database. This has always worked just fine when we use a GET function.

    PROBLEM. We are now needing to use the POST function to send variables to the php script. For some reason, when the Authorware file calls the php script with a POST function, the php file opens in a new window. We did not tell the php to open in its own window. It should have just returned a value back to Authorware.

    It really seems as though there is something in the PHP settings that may be causing this.

    1. Does anyone know ANY reason that a php script would open in its own window without specifically telling it to?

    Using
    . php 5
    . tried under Windows XP & Windows 2003 Server.

    We took the php code down to bare bones:

    ----------------------------------
    <?PHP
    header("cache-control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    ?>
    <?php
    echo "I'm in the gSys.php file.";
    ?>
     
    jwpryor, Feb 5, 2007 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Can you post the form code that makes the post. PHP is executed entirely on the server, so it is most likely an HTML or javascript code that is opening it in a new window. Something like target="_blank", target="_new" possibly.

    Also is this something automated making the post, or is it user initiated?
     
    jestep, Feb 5, 2007 IP
  3. jwpryor

    jwpryor Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you for the quick response.

    I don't know if you are familiar with Authorware or the other Adobe products like it, but Authorware sits in its own window and uses its own functionality to call middleware like php. It is (suppose) to act just like html does when it calls the php. But I'm able to do a simple form with a submit that posts to the PHP and its works fine. But not when Authorware calls it. All posts to the Authorware forum about this problem have pointed to settings in php, but there is no answer to which settings.

    Julia
     
    jwpryor, Feb 5, 2007 IP