SOLVED, I missed to add a folder path. Recently restructured my server and thereby caused a problem for me.
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:
$redirrURL = $_POST['pageType'];
header( "Location: $redirrURL" );
this is where I call the PHP file that uses the header();
<form method="post" action="rateBarFunction.php">
<td>
<input type="hidden" name="pageType" value="<? echo $redirrURL ?>" />
<select name="grade">
<option value="" style="display:none;"></option>
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
<input type="submit" name="submit"/>
</td>
</form>
<?php
echo "</tr>";
}
echo "</table>";
?>
Is it not working because I echo HTML-code after I use header()?