Open alhadidy opened 8 years ago
Ok, just post your code here (setup.php is the only one necessary) and I'll find the error and give you a solution :P If the code looks messy use http://pastebin.com/
`<?php
include('../config/connection.php');
include('functions/data.php'); include('functions/template.php');
DEFINE('D_TEMPLATE', 'template');
$debug = data_settengs_value($dbCon, 'debug-status');
if(isset($_GET['page'])) { $pageid = $_GET['page']; } else { $pageid = 1; }
$page = data_page($dbCon, $pageid);
$user = data_user($dbCon, $_SESSION['username']); ?>`
this is my code, thank you for your help :)
Well it's actually very simple.
Just place this on the part where you call the user function (#user info setup):
if(isset($_SESSION['username'])&&!empty($_SESSION['username'])){
$user = data_user($dbCon, $_SESSION['username']);
}
I can't check the code because I'm on my phone, but it should work (and be correctly written). You should add something similar to the outputs too.
That basically checks if the username exists, and that is valid 😉
thank you very much :), actually it's my first course of coding, i have just started learning php from youtube.. @creptor
when logout the value of $_SESSION become Undefined in setup file where the function of $data_user is and that is obvious cuz i just unset it be logging out but the error is there hope i find help here...