Guys I am trying to redirect to another page using the following:
if( $GET['command'] == "showCurrentPostings" )
{
//fetch the job postings for this company
$currentPostings = getPostings( $POST['company']);
}
else if( $GET['command'] == "showPosting" )
{
//Redirect to allow them to edit job
$posting_id = $POST['posting'];
//Close the database connection
mysql_close();
//Clean the buffer, guards againist headers already sent errors
ob_end_clean();
header( "location: login.php?id=$posting_id" );
exit();
echo "hi";
}
It prints out the hi, but onto the current page and does redirect! What am i doing wrong? I have used this header function else where and it works!