Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  password protect of add, change and delete record

phpMyEdit General     password protect of add, change and delete record
Post new topic   Reply to topic    
 
Pjotr1234     Joined: 28 Dec 2014   Posts: 4  
Post Posted: 2014-12-28 18:43
Back to top  Reply with quote     

Hi,
I have function phpMyEdit code for editting my DB.
I would like to implement password protection of insert, delete and change actions. It mens that everybody can see all records, but changes will be protected by password. It doesn't matter if pwd will be stored in DB or hard coded in variable.

Could somebody help me ?

I am beginner = sorry for stupid question. My idea was to do it by trigger, but I am not abble to write function code for pwd input and check if it is correct.

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2014-12-29 20:09
Back to top  Reply with quote     

You probably need a login system for users, as described at http://www.phpbuilder.com/columns/user-authentication/Jason_Gilmore05172011.php3

Or maybe a user login exists with a user_id which could be made to correspond to a record_owner_id field in the data table. Then facilitate different permissions based on comparing record_owner_id with user_id.

user_id is usually populated in a session variable when users log in.

 
Pjotr1234     Joined: 28 Dec 2014   Posts: 4  
Post Posted: 2014-12-29 22:08
Back to top  Reply with quote     

No, my site is accesible for everybody. No one needs password for look at data. But I need to prevent changes of data for each. Change data can just few people. Therefore my idea is to add password field to add, copy, change and delete form. I do not know how. It is possible to make alter table add column password, but this functionality is not clear and it does not work for delete form. Password could be the same for each.
Do you have any idea how to do it ?

 
doug     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2014-12-29 22:32
Back to top  Reply with quote     

Simplest way, assuming your website control panel offers an htaccess utility, would be to put a copy of the form in a password protected folder, which users would have to access in order to add/change/delete records. Anyone can view the public data so there you can disallow changes and allow changes in the new folder only.

Otherwise you need a login system as previously suggested, which is too complex to discuss in this forum.

 
Pjotr1234     Joined: 28 Dec 2014   Posts: 4  
Post Posted: 2014-12-29 22:48
Back to top  Reply with quote     

I have php script on my site which was generated by phpMyEdit. I understan how User Authentication (login script) works, but my problem is that I do not know how and where I can authentication script add to my existint php (phpMyEdit) file.
The best solution is to add password field to add, copy, change and delete form which is triggered from main grid page of phpMyEdit file. But id do not know how.

 
Pjotr1234     Joined: 28 Dec 2014   Posts: 4  
Post Posted: 2014-12-30 11:59
Back to top  Reply with quote     

Main page of my php application which was generated by phpMyEdit looks like http://s27.postimg.org/db4oscw3n/products1.jpg
Page for actions add, copy, edit and delete looks like http://s14.postimg.org/ldeffh5up/products2.jpg
But I need implement password protect for this actions, therefore e.g. delete page should looks like http://s14.postimg.org/4e5h07un5/products3.jpg (added entering field for password).

Does somebody know how to do it ?
Where into my php file (by phpMyEdit) I shoud add password field ?

Thx in advance

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy