Jump to content

How to check if the person is an admin?


nakash

Recommended Posts

Hey there, I'm new to MYSQL and PHP and I'd like to ask a few questions;

I have a database with 3 users and I want to check if that person is an administrator, I've already created the field 'Admin' in the database, but I don't know how to check it in the file.

I'm using a login system and it saves the session of his ID and the name.

		$member = mysql_fetch_assoc($result);
		$_SESSION['SESS_MEMBER_ID'] = $member['id'];
		$_SESSION['SESS_FIRST_NAME'] = $member['Name'];

Is there a way to check if that specific person is an admin?

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/204677-how-to-check-if-the-person-is-an-admin/
Share on other sites

  Quote

Hey there, I'm new to MYSQL and PHP and I'd like to ask a few questions;

I have a database with 3 users and I want to check if that person is an administrator, I've already created the field 'Admin' in the database, but I don't know how to check it in the file.

I'm using a login system and it saves the session of his ID and the name.

		$member = mysql_fetch_assoc($result);
		$_SESSION['SESS_MEMBER_ID'] = $member['id'];
		$_SESSION['SESS_FIRST_NAME'] = $member['Name'];

Is there a way to check if that specific person is an admin?

Thanks in advance.

 

Sorry for doubleposting, but I couldn't edit this message.

 

My second question is how do I do change a field of someone using his ID? ('id')

I know it's something with UPDATE ;p

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.