How to secure a dynamic page from unauthorised access

I sorted it - now only URL that matches logged in student number is displayed - no data is displayed if someone changes the URL to end in another student number