Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]problem z access_lvl
achill
post
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 28.08.2009
Skąd: wertykalne przez większość dnia

Ostrzeżenie: (0%)
-----


mam taki problem
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'; ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 11:31