I am working on a PHP script that will change the header of the page the user is currently on when a dropdown selection is made, the page will stay the same, but the information will alter. I am able to do this by manually changing the location in the URL bar, but so far have been unable to change the header automatically.
<select name = "rowno" onchange=header("Location: /Work/Log/new.php?rowno=$rowno")>
I am totally unsure of how to do this, so any help would be greatly appreciated, I have already set $rowno as a variable.
EDIT
$header = $entry[ID];
$iCountHeader = count($header);
echo '<select onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">';
for ($i = 0; $i < $iCountHeader; ++$i )
{
echo '<option value ="/Work/Log/New.php?rowno=' . $header[$i] . '">' . $header [$i] . '<option>';
}
This has allowed me to go to 'http://localhost:8800/Work/Log/1' for example, but I am still unable to make it go to 'http://localhost:8800/Work/Log/new.php?rowno=1'