Fairly new to PHP. I have an HTML form in one frame and am using a php script to generate code that I would like to display in second frame (when I push the form's submit button. ) Have not yet found a strategy that works.

1) I don't care whether I use a regular frame or an iframe.
2) Optionally I would be okay with outputting to a file which is the src for the 2nd frame (know how to do that) except that I can't figure out a way to automatically refresh the frame when the button is pushed.

Any help would be welcome !😕

    You could use a target attribute for the <form> tag. (If you go with this approach, you should use a "loose" document type for your [X]HTML page that contains that form.)

      Thanks Nogdog,

      Just got an answer from another forum that works on this: Create a named iframe and have the form action target the iframe. Must use "post" as the method -- "get" truncates the output for some reason.

      CODE:

      <form action="mycode.php" method="post" target="myframe">
      ...
      </form>

      <iframe name="myframe" ... >
      </iframe>

      Could not get regular frames to work for this -- only the iframe.

        Write a Reply...