I ran this code and I got a Resource id #3 error where it should have showed the full movies table.
mysql_connect(\"localhost\", \"root\", \"password\") or d
You're not getting an error, the MySQL API is just doing what you're asking it to: echoing the contents of $data, which is a MySQL query resource at this point. Extend the code to actually retrieve the results:
while($row = mysql_fetch_object($data))
var_dump($row);
And you'll see the output.
Note that the mysql_* API is deprecated since PHP 5.5 by the way.