Jump to content

php mysql help


Dsnowdon

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/202753-php-mysql-help/
Share on other sites

Everything there looks good.  What part of it doesn't work?  Are you getting an error message?  If not, put a

 

ini_set('display_errors',1);

 

at the top.  If it isn't an error, try

 

print_r($user); to make sure you have all the data you were expecting. 

 

Do you have:

 

session_start();

 

somewhere?

 

etc, etc.

Link to comment
https://forums.phpfreaks.com/topic/202753-php-mysql-help/#findComment-1062769
Share on other sites

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.