jeudi 14 mai 2015

I have a set of users.Now on one of my website page i have suppose 5 links.I want only specified users to access particular link

![Sup][1] Solution I think: I should make one database table with field username and each link(say total no of links=5 hence total columns=6) now if a user is allowed to access that link i should mark that field's(link) value in database as 1 else 0; now whenever user try to access that link i should first check whether field's value corresponding to that username(I can get username through session.getAttribute() method which i have set at login) If it is one then user is allowed else Not allowed

but my problem is that if would have been tet box i would have easily get value related to selected link by getparameter() but since it is a hyperlink how should i retrieve the value corresponding to which i will check in database.

I don't have enough reputation to post images otherwise i would have posted. please help me and i assure you i am not asking for DIRECT code




Aucun commentaire:

Enregistrer un commentaire