(please specify the website or account you are asking about)
Error Message
The problem is that when I test one of my pages it doesn’t connect to the database at all, although I exactly copied the database username, host, password and name while checking multiple times if I did this correctly.
Other Information
I can’t give a lot of details of course due to security and not sharing the database login details.
The *** are the password and the numbers in the host name.
I created a database called “users” and as I understand this should be how you connect to it. The users database contains a table “search_engine” with a table of the links for the search engine.
So what exactly do you see that makes you say that this is a database connection issue? How do you know it’s the database connection when there is no error message?
That is what is confusing me. I have this exact same code and website on another web host provider as well and there it works flawless, so it must be something with the database connection. Do you need to set some kind of PHP ini file?
I’m sorry, but I don’t agree with your logic. There are many reasons why a web page interacting with a database is not returning the right results. Even if the same code is working on another provider.
Especially since your code should report errors if the queries or connection fails fail, which it doesn’t do. So that proves that it’s not the database connection.
I checked your account to see if I could try the page for myself. So I found your search engine page, looked through the database, and I searched for “rayman”. And I did get multiple results for that query.
So as far as I can see, your database connection is working fine.
Sorry, before you saw that it worked I was trying to fix it and found a fix. I couldn’t reply though because I hit a “16 replies per day” limit on this forum so it was impossible for me to reply to you or on this post that I had solved the problem. What I wanted to post was:
"I solved it! I had misunderstood using the panel password, I thought it was ment to use my own password (of account), but I had to copy the password which was hidden under the account details!