averagecoder Posted March 8, 2017 Share Posted March 8, 2017 I have PHP, Apache and Postgres all running on one CentOS 7 server.I want a web front end that requests a username and password. If authentication works, I want the application (web front end) to allow the user to retrieve database records. How do I create a PHP web page that performs authentication (and tests if the credentials that were entered valid or not)? Quote Link to comment Share on other sites More sharing options...
requinix Posted March 9, 2017 Share Posted March 9, 2017 Depends. What username and password? What database records? You're describing something that is basically a CRUD (create, read, update, delete) system and is pretty easy to do - once you know all the requirements. Quote Link to comment Share on other sites More sharing options...
averagecoder Posted March 10, 2017 Author Share Posted March 10, 2017 I'm starting with an empty database. I want to provide 10 users credentials to a web front end. I'm going to create tables. I want the users to have access to the new tables I create. They probably should not have access to the system tables. I don't want anonymous people on the internet to be able to access the database through this web page. Please let me know if you need more details on the requirements. Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted March 10, 2017 Share Posted March 10, 2017 I'm starting with an empty database. I want to provide 10 users credentials to a web front end. I'm going to create tables. I want the users to have access to the new tables I create. They probably should not have access to the system tables. I don't want anonymous people on the internet to be able to access the database through this web page. Please let me know if you need more details on the requirements. I don't think anybody here is going to do the work for you. Do you have anything so far other than the requirements? Break it down one step at a time and then if you have trouble in a single spot post the code you're using and we can help. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted March 10, 2017 Share Posted March 10, 2017 this is a very common application. there are countless examples posted on the web showing the logic needed to do this. the only portion of an authentication script that would be Postgres specific would be the DNS (Data Source Name) used when making the connection to the database server and any database specific sql and php statements and if you use php's PDO extension, the php statements would be generic, simple, and straightforward. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.