I have 2 views namely students
and student
. The students
view will list all the students and student
view is to show the details of the student. These 2 views are accessible for all staffs in the school to view their students.
Currently I using an anchor link in the students
view by passing the student_id
as one of the argument in href to the student
view. The problem here is if the staff simply goes to the URL and changes the student_id
to some other number then the staff able to view the other student details.
I want to stop this in a easier way instead of checking again on the database whether the particular student reports to the logged in staff.
I thought of something to do with Joomla form.token
and submit the first view while clicking the student name and the next view can validate the token and show the full details.
I am not sure whether it makes sense but I thought this will make my life easier instead of writing several validations.