Jump to content

Dsnowdon

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Dsnowdon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello this is my code i will be using a inclde to include it on my nav bar but dream weaver says there is a syntex error on line six can some one help me with that please. thanks in advance Dale <?php require_once('../auth.php'); require('connet.php') $user_id = $login; $query = "SELECT * FROM `members` WHERE user_id = '$user_id'"; $resultm = mysql_query($query); $user = mysql_fetch_assoc($resultm); ?> <?php echo "Hello {$user['firstname']}:<br /><br />\n"; //Only display link four for users of level 1 if($user['level']=='1') { echo "<a href="#">Link 4</a><br />\n"; } ?>
  2. ok i have make this file its called admin_menu.php.inc <?php require_once('../auth.php'); require('connet.php') $user_id = $_SESSION['SESS_MEMBER_ID']; $query = "SELECT * FROM `members` WHERE user_id = '$user_id'"; $resultm = mysql_query($query); $user = mysql_fetch_assoc($resultm); echo "Hello {$user['firstname']}:<br /><br />\n"; //Only display link four for users of level 1 if($user['level']=='1') { echo "<a href="#">Link 4</a><br />\n"; } ?> i am going to include that file on my dream wever template but it dont work for some reson can some one help me please thanks dale
  3. Basicaly i want to have certian links to apeer on on the nav bar when a user with the level on lets say 1 to i have done this before and i cant remember the code so i need some help There level is in a database called dalsno3_db the table is called members i know you will need a were first name in the database = $_SESSION['SESS_FIRST_NAME']; so for that could you use mysql_query("SELECT * FROM members WHERE firstname = '$_SESSION['SESS_FIRST_NAME']'"); '$_SESSION['SESS_FIRST_NAME']' = $firstname also would this work if ($firstname["level"]!=='1') { do something } i am quite new to php thanks dale
×
×
  • 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.