When I put in on a production enviorment I don't get any errors, by the way. Guess I will then work on it live... strange...
I still want to learn the errors...
1. This I have for error handling of the database:
config.php *line 57
if(!$db){
die('Unable to connect to database [' . $db->connect_error . ']');
}
2, Hope I get this I am really trying hard to understand this line, (really need to study more PHP, really apriciate let me think about the script.
header.php
if ($_SESSION['role'] !== 'admin' and $_SESSION['role'] !== 'moderator'){
header( 'Location:'.config::site_url.'index.php' );
First off all thanks for the awnser I am still in a learning curve. 1. Hope I got this right but it is in the config.php file line 55:
$db = new mysqli($config['db_host'], $config['db_user'], $config['db_password'], $config['db_name']);
2. This question I am not complete getting. But I give it a try. (function.php):
$urls = isset($_SESSION['user_id']) ?detail($row):'./signup';
On the mainpage I am getting this error:
$result = $db->query($query);
And on the admin section:
if ($_SESSION['role'] !== 'admin' and $_SESSION['role'] !== 'moderator'){header( 'Location:'.config::site_url.'index.php' );
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.