No problem showing records in localhost, but not showing in webhost

My database is working really well in localhost, but i’m not sure why it’s not showing records of data in webhost. The database host,user,pass, and name are all correct either. Is there a reason why it’s not working?

Here’s my site.
No result, even entering only ‘a’ should come up lots of data which happens in my localhost, but with webhost, there’s nothing.

Here’s my php code (I only put important php codes)

Did you upload your database onto the server?