... and where does this: ($query = mysql_query($sql) or die(mysql_error())😉 come into the picture at all?
Seriously though, when you say it doesn't redirect, what's it doing instead? Does the page just sit there? Are you getting errors? As far as the code goes, you ask, what's wrong with the header? Well, the code looks fine. Give details to the problem...