I would really appreciate some help, My problem is that I have multiple databases created and I would like to be able to see and select them in an HTML form. But when I try to retrieve the names of the databases I have created my form comes back empty. Is it possible to do this? If so where have I gone wrong and how do I fix the Problem? The code I have come up with is as follows:
query() in your situation should never return a boolean true, so a type strict comparison with TRUE would never happen to be valid.
And even if you get to run any query, it’s still a database, and you mostly won’t get any string from it, so echo is the wrong approach to display any data, use var_dump() instead. DATABASES is plural, so you should at least get an array.
You should really start again with learning this. And you could then better switch to PDO: