Note that I removed your extract($_POST) as well. This is a horrible habit to get used to, and might even compromise the security of your code. (Which is why the register_globals feature - which is what your extract code replicates - has been made deprecated, and removed from future versions.)