I am trying to delete a record from my dropdown selection, but after the record is deleted I can still see the record from the dropdown selection tag.
So, I need to reload the page in order to see the effect.
I am trying to solve the problem by using
header() function to reload the page
if($delete){
$query = "delete from umb_artist where artist_id = $id";
if ((@($query,$conn)) && @mysql_affected_rows() == 1){
header("Location: "."main.php"); echo "<tr><td>successful</td></tr>";
}else{
echo "<tr><td>fale</td></tr>";
}
}
However, it doesn't work either and it gives me a warming
Warning: Cannot add header information - headers already sent by
Can someone please help
Thanks in advance