How does PHP/SQL database do it?

Doraemon

New member
Let's say someone built an internal search engine for his website, and there is the text box where visitors can enter the words they want, and all goes well and it returns a set of results.

My question is, how does the PHP do it, without anyone logged in in the valid way? Don't we have to log in using a correct password first, if we want to take advantage of search engines running on PHP? Is it called the anonymous log-in? If yes, how do I do that? (as a php builder)
 
The database sits on the remote server (either the same web server system as the site or a separate server that the web server has access to). In the PHP script that fetches the data, a user name and password are passed to the database to allow access to the tables for a query. This is usually passed in during the connection request. The user name is generally an account that has read access only for anonymous searches. The database administrator and the PHP developer know this account.

In the case where a user is requesting that data be written to the database, then the user would have to log in to the site in some way and be authenticated to send a write/update request. Again, the actual changes are not done directly by the user, but by some special database account that has write privileges.
 
Back
Top