Also, you must have a complete URL with header("Location: ...") and Location must have a capital L... surely it works if you don't do that, but some browsers are very strict and only respect standards...
Also, don't put a semi-colon ( ; ) after a " } "...
if(condition) {
code
}
NOT
if(condition) {
code
}
Like said ir4z0r, even though a field is empty, it is set.. so if you check if it is set hoping it will return false since it is empty, you'll hope for a very long time... ! You must check if the field is empty, not if it is set. I recommend you to use the trim() function to remove unuseful spaces...
if(trim($my_variable) == "") {
// the field is empty.
}
Suppose $my_variable = "", the condition will be true...
Suppose $my_variable = " ", the condition will also be true...
Did it help ?
(Also, please check your language...)