Redirect Server based PHP output to a WP Page
-
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.
- The topic ‘Redirect Server based PHP output to a WP Page’ is closed to new replies.