The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> prompting for username and password pass to mariadb
Jack42
post May 27 2022, 10:02 AM
Post #1





Group: Members
Posts: 8
Joined: 24-May 22
Member No.: 28,363



I created a webform for users to submit data and store the input in the mariadb database. The data input side is working fine. Now I need to create the page where the data is verified and approved or denied. For the data input I used a hard coded username and password in the php. This is what I did in mariadb:
CREATE USER 'username'@localhost IDENTIFIED BY 'password';
GRANT INSERT ON mytable TO 'username'@localhost;
and used those credentials in the PDO.
For the verification side I would like to prompt for a username and password and pass that information to mariadb for PDO usage. The goal is not to create users in Linux, htaccess, mariadb, etc. I am looking to create just 1 username and password for easy maintenance.

Should I have httpd prompt for the username and password? Should I write php to accept a username and password? I come from a windows background where this is usually handled by IIS windows integrated authentication and Active Directory.

This post has been edited by Jack42: May 27 2022, 10:11 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 17th May 2024 - 01:14 AM