Warning: Cannot modify header information - headers already sent by (output started at /www/zzl.org/s/l/p/slprogrammersheaven/htdocs/test1/logincode.php:2) in /www/zzl.org/s/l/p/slprogrammersheaven/htdocs/test1/logincode.php on line 34

See empty space before '<?php'? That's called whitespace. Also could be empty line.Everything what's not inside of PHP code declaration, is considered to be part of HTML. And when headers come in to game, it could mess them up.