Hi everyone,
I'm having trouble debugging a PHP web app using Eclipse PDT and Zend Debugger. The thing is, I echo a form that looks like this:
<form name='form1' method='POST' action='hello.php'>
...
</from>
This will work in run mode, but not in debug: the Browser Output window shows only "blankhello.php" (notice it concatenates "blank" to the filename specified as the action argument). I found somewhere that redirecting by using the header("Location: blablabla") could cause problems but am I supposed not to be able to use forms and send the information to the page? Is there some workaround to this? I found this script that works when using header:
function redirect($url, $debug = false) {
//If manual page redirects have been enabled then print some html
if ($debug) {
echo "<b>Redirect:</b> You are being redirected to: <br /><a href='$url'>$url</a><br />\n";
echo "Backtrace: <br /><pre>\n";
debug_print_backtrace ();
echo "</pre>";
} else {
header ( "Location: $url" );
}
exit ( 0 );
}
It transforms header redirects into manual links when debugging but I still can't figure out how to use redirections and debugging from within a form...
Any ideas?