Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Štvrtok, 26. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  password protect of add, change and delete record

phpMyEdit General     password protect of add, change and delete record
Odoslať novú tému   Odpovedať na tému    
 
Pjotr1234     Založený: 28.12.2014   Príspevky: 4  
Príspevok Zaslal: 2014-12-28 18:43
Návrat hore  Odpovedať s citátom     

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     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2014-12-29 20:09
Návrat hore  Odpovedať s citátom     

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     Založený: 28.12.2014   Príspevky: 4  
Príspevok Zaslal: 2014-12-29 22:08
Návrat hore  Odpovedať s citátom     

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     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2014-12-29 22:32
Návrat hore  Odpovedať s citátom     

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     Založený: 28.12.2014   Príspevky: 4  
Príspevok Zaslal: 2014-12-29 22:48
Návrat hore  Odpovedať s citátom     

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     Založený: 28.12.2014   Príspevky: 4  
Príspevok Zaslal: 2014-12-30 11:59
Návrat hore  Odpovedať s citátom     

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

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov