I am creating a booking system for some student cabins.
The user control needs to be strict, so no outside people can use the system. The last system was on the university server, and connected to a database (that has to be located on the university server, don’t ask why!). The security of the server is bad (every user can, with some skills, view content of php-files). We decided to move our site to an external server to increase security. The problem is that the university server doesn’t allow external access to the database. Over to the problem:
Alternative 1:
I want to update the database on the external server regularly, so that it is up to date with a user table in a database on the university server.
Alternative 2:
When a user login, I want to validate the credentials by using a script located on the university server.
What is my best approach, and how should I approach (some details would be appreciated)?
Well, both of you problems are easily solved by using scripts on the remote server.
Make one to dump and output user table request (and import that dump on your side) and another one to get login and password, check them against current database and then output result of the check.
Do worry about security though. Especially with this database dump script.
Oh, that was an alternatives, not “I need both”. In that case I would certainly go with #2. It’s correct and secure way to do that.