/    Sign up×
Community /Pin to ProfileBookmark

add member script problem

I Have a login system and a ranking system and i have a file called add_member.php

no what i want i want it to check if the user has the rank of 3 the field the 3 is in is called rank which tells the script that it has 2 be 3 or 4 and above

Now i have a problem were i want it so it checks if the rank has 3 or greater if so echos “Welcoem to add member page if not then say you dont have enough access and if they arent logged in show the login.php

now this is what i have

[code=php]
<?php
session_start();
include(“dbconnect.inc”);
if($_SESSION[‘user’])
{
$user=TRUE;
if($data[‘rank’]==3)
{
echo “Welcome to Recruitment Page”;
}
}
else
{
//checks if the user
include(“login.php”);
}
?>
[/code]

Is that correct how i have done it if not how shuuld it been done? cuz when i did it as above its showing the login page and instead of the wecome to recruitment page how can i fix this?

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @william232 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...