Hi
I have only recently started to learn PHP and have been following tutorials to help me along the way. I have implemented a system via the tutorial at: http://www.php-mysql-tutorial.com/cms-php-mysql.php with a few modifications to suit my site better.
My site is set out using a pages directory and a common index page where i use a $_GET code for dynamic linking (i'm not so sure this is very secure either??) but when trying to access an adminstration section (obvisously in a different directory) the session doesn't hold, is there something i am doing wrong.
The basic code (not for the adminstration pages) i am using to check session details is:
<?php
// logged in or not?
if (!isset($SESSION['image_is_logged_in']) || $SESSION['image_is_logged_in'] !== true) {
echo '<a href="./index.php?page=loginprofile">Login</a> or <a href="./index.php?page=register">Register</a>' ;
}
else {
echo '<a href="./index.php?page=logout">Logout</a>' ;
}
?>
Basically am i doing something wrong or am i using the wrong method? Also is using $_SESSION secure enough?
ttfn