password protected button

Dharmeshdhabu

New member
I have created php project for hospital management. I have a button to update patient data. I wish to protect update function with password, means when button is present, a pop up message should flash asking to enter password and upon entering correct password only, data should be updated. Please guide me.
 
Simply, add a new field for the password in your form and validate it on backend, if password is invalid then show error message and disallow to save the data in the database
 
Yes, I have done the same, but I wish a pop up input box for password because at present if I put wrong password, it did not show message. Actually session message is shown when I go to some other page only. I don't know why this is happening. I have action="" means action on same page still message is not shown on same page. Please guide me.
 
if you have action="" then you can remove that attribute. You can add new password field and add validation on the same page to check the password.
It should be easy if you know the app code, so I don't know how to guide you to do that without basic knowledge of your code
 
Michalio said:
if you have action="" then you can remove that attribute. You can add new password field and add validation on the same page to check the password.
It should be easy if you know the app code, so I don't know how to guide you to do that without basic knowledge of your code

I used alert message instead of sessions message and problem is solved at present. What I want is a popup input box for password. Is there a way to get it?
 
You mentioned that you are using jquery, so there is a dialog component for that: https://jqueryui.com/dialog/#modal-form
 
Back
Top