• Resolved WPAdminJoe

    (@wpadminjoe)


    I hope someone can help me,
    I have 2 WordPress pages,

    Page 1 Contains a PHP include to a server side procedurePHP1 which generates a form. This form then submits to another server Proc PHP2

    Page 2 Is empty and should receive the output from Proc (PHP2).

    I have attempted to use Header redirect, session_start(); (POST/GET) but Page 2 always opens up blank(empty).

    Testing:

    Removed the HEADER Redirect statement from PHP2 and replaced it with a simple Echo $Var, The correct output opens up in the web browser (IE, Chrome) outside of the theme environment.

    I have tested the variable which contains the results of PHP2 by performing the following. At the end of the PHP2, I added the following:
    /
    if (isset($Var)) {
    echo “Var is set and not Null”;
    echo $Var;
    } elseif (empty($Var)) {
    echo “Var is empty or not set at all”;
    } else {
    echo ” Var error”;
    }
    /
    I get the message Var is set and not Null and the correct results are presented in the browser (outside of web theme)

    I then add the Header Redirect to strong>Page 2 and add the same code.
    /
    if (isset($Var)) {
    echo “Var is set and not Null”;
    echo $Var;
    } elseif (empty($Var)) {
    echo “Var is empty or not set at all”;
    } else {
    echo ” Var error”;
    }
    /
    I get the message Var is empty or not set at all and Page 2 is blank (empty).

    Cant figure how to get $Var to Page 2 within PHP2 procedure.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter WPAdminJoe

    (@wpadminjoe)

    Their must be some WP guru’s that could help with this problem? It’s really holding me up.

    I know someone out there must have a server side PHP proc that sends the result variable to a blank page.

    Thankx

    Thread Starter WPAdminJoe

    (@wpadminjoe)

    FYI,

    I resolved the problem by rethinking the process. Initially, my objective was:

    Page 1 > Include PHP1 (builds Form) > call PHP2 > Page 2 (receives results $Var from PHP2

    Solution:
    Page 1 > Include PHP1 (builds Form) > call Page 2 > Include PHP2

    Wpadminjoe

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect Server based PHP output to a WP Page’ is closed to new replies.