Note: Please use code tags. Tell us what errors you get. Use: error_reporting(E_ALL); at first in your code to check the errors in it.