chce aby pewna tresc pokazywała sie tylko uzytkownikom z access_lvl ==2 czy ktos mi moze wytlumaczyc czemu ponizszy kod nie działa?
tabelka oczywiscie jest - daje caly kod - choc reszta dziala
CODE
<?php session_start(); ?>
<?php
require_once 'conn.php';
require_once 'header.php'; ?>
<style type="text/css">
body {
background: black url(tlohome.jpg) top center no-repeat;
}
</style>
<div id="text"><p>
<?php
if (isset($_SESSION['name'])) {
echo ' Welcome ' . $_SESSION['name'] . ' ! ';
}
?>
<br>
<br>
<?
$sql = mysql_query("SELECT text FROM home WHERE id='1'");
$row = mysql_fetch_array($sql);
echo $row['text'];
?>
<br>
<?php
if (isset($_SESSION['access_lvl'])
and $_SESSION['access_lvl'] == 2) {
echo " modify ";
}
?>
<br>
</p>
</div>
<div id="menu">
<?php include "menu.php" ?>
</div>
<?php require_once 'footer.php'; ?>
<?php
require_once 'conn.php';
require_once 'header.php'; ?>
<style type="text/css">
body {
background: black url(tlohome.jpg) top center no-repeat;
}
</style>
<div id="text"><p>
<?php
if (isset($_SESSION['name'])) {
echo ' Welcome ' . $_SESSION['name'] . ' ! ';
}
?>
<br>
<br>
<?
$sql = mysql_query("SELECT text FROM home WHERE id='1'");
$row = mysql_fetch_array($sql);
echo $row['text'];
?>
<br>
<?php
if (isset($_SESSION['access_lvl'])
and $_SESSION['access_lvl'] == 2) {
echo " modify ";
}
?>
<br>
</p>
</div>
<div id="menu">
<?php include "menu.php" ?>
</div>
<?php require_once 'footer.php'; ?>