In reply to chr_sue:
Thanks for the correction you made.But I am getting fatal error while running the code.