Hey everyone,

I have just uploaded my php files onto a free hosting server and tried to access the website. I got this error " mysql_fetch_array() expects a resource in parameter 1" or something like that. By the way, the files did work on my local machine.

What is the problem? and how do I go about fixing it?

That is usually the error message when your query has failed. Add error checking.

die(mysql_error() ); helps a lot with debugging things.

You will change your while loop condition with the following and test again.

$data = $result->fetch()