Hi Houdini
I created, named, and finally saved the file into the htdocs folder as you suggested and it worked a treat! Which means i was doing it wrong all the time.
My friend installed XAMPP onto my computer for me. But i have just found out that he didn't configure php ini or apache to have the mail server set to be my isp's mail server. Could this be the problem? If so could you please advise me how to remedy the problem please. Many thanks. bombayduck