I suggest you study a little more before you start coding. (http://w3schools.com/php/php_intro.asp is a good point for starters) Your code is very poorly formatted and would give many notices if error_reporting were set to E_ALL Moreover variables like $_SESSION[12345] will certainly cause problems at one point or the other KK.