Jump to content

How do I create a PHP web page that does authentication?


averagecoder

Recommended Posts

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)?
 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.