It might be a stupid question, but is a question nonetheless. On my desktop with wampserver on, I have been connecting to all the databases with a common username and password.
When I create database on the server hosting my site, I realize that I can't have same username for two databases. In my php files, I had used the above code to establish connection to whichever database I required. Now, I will have to alter the code specifically for each of the databases.PHP Code:mysql_connect("localhost","root","password")
Is there an alternative to this? Can I use localhost and root on my server?




Reply With Quote