Hi. Been trying to make a (basic) social networking site for my school but have had problems with users being able to add themselves as friends. Seems stupid but it is annoying!

I have tried using the code:

<?php if ($_SESSION['MM_Username'] == '****') { ?>

But it wont load dynamic data as its "==". Is there anyway I can do this?

Sam T

You can keep access level column in user master table.
Whenever user login save his/her acces level in session variable and which ever page you want to secure check condition at the beginning of the page. also you can hide/show buttons and links according to access level saved in a session variable.

NICE :D and how can i hide/show button according to user ID , you can notice the URL of Edit orange link button on the right col, so when the user log in he only can see his modifying buttons !!

and i'm searching for something like that long time ago
sorry for my English
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.