Hello.
I have a website and I have another URL of the website forums ( same host - different database ).
How I can impelement latest threads from forum in my website? (I mean, connecting to the database and querying the forum latest posts, and after it’s all done, connect back to my original website database)
You are over thinking this. Simply create a new PHP script, that connects to the forum database (using a unique variable name), queries the data, and closes the connection. So long as you don’t re-use the same connection variable name you use for your current website, it won’t break your current website.
Oh lol. So I just should create a new .php file, put the script in it with the new connection to the new database, using the require() or include() from the original file and it’s ready to go?
Do I have to close the old connection in the new file and start it again after the new code?
Because it says ‘Access denied for user ‘apache’@‘localhost’ (using password: NO’