Problems with PHP header(), redirect to HTML page in parent directory

grediageHeill

New Member
Having troubles with the header() in PHP, when im trying to redirect to HTML-page in parent directory. I have tried to find some answers in the forum but without success.I have tried using both ../above.html and the full adress http://www.test.com/above.html without success. Also something to mention is that I send the redirrURL with a hidden input, but I have checked that I get the correct adress.This is how my code looks right now, but I keep getting 404:\[code\]$redirrURL = $_POST['pageType'];header( "Location: $redirrURL" );\[/code\]this is where I call the PHP file that uses the header();\[code\]<form method="post" action="rateBarFunction.php"> <td> <input type="hidden" name="pageType" value="http://stackoverflow.com/questions/15817310/<? echo $redirrURL ?>" /> <select name="grade"> <option value="" style="display:none;"></option> <option value="http://stackoverflow.com/questions/15817310/5">5</option> <option value="http://stackoverflow.com/questions/15817310/4">4</option> <option value="http://stackoverflow.com/questions/15817310/3">3</option> <option value="http://stackoverflow.com/questions/15817310/2">2</option> <option value="http://stackoverflow.com/questions/15817310/1">1</option> </select> <input type="submit" name="submit"/> </td> </form><?php echo "</tr>";}echo "</table>";?>\[/code\]Is it not working because I echo HTML-code after I use header()?
 
Back
Top