Every machine is a localhost on its own right. Read something about the loopback network interface aka localhost.
chesos christ
If you are running that code and the db on the same box, try using localhost.
Thanks.
Forgive my ignorance
Cool, lets know if the problem is fixed.
Hi. Yes, the problem was fixed. It was the Lhost thing. It was calling the script from an external server. And i had already changed to a localhost where the db is. Thanks guys…am sorted.