Closed hashmi82 closed 10 years ago
Cheers, Paul
Hey Paul,
Can you copy/paste your data.php
and your `setup.php`` for me?
Yeah sorry was just opening everything up and got side tracked here you go.
data.php <?php
function data_setting_value($dbc, $id){
$q = "SELECT * FROM settings WHERE id = '$id'";
$r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
return $data['value'];
}
function data_user($dbc, $id) {
if(is_numeric($id)){
$cond= "WHERE id = '$id'";
} else {
$cond= "WHERE Email = '$id'";
}
$q = "SELECT * FROM Users $cond";
$r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
$data['fullname'] = $data['First'].' '.$data['Last'];
$data['fullname_reverse'] = $data['Last'].', '.$data['First'];
return $data;
}
function data_page($dbc, $id) {
$q = "SELECT * FROM Pages WHERE id = $id";
$r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
$data['body_nohtml'] = strip_tags($data['body']);
if($data['body'] == $data['body_nohtml']) {
$data['body_formatted'] = '<p>'.$data['body'].'</p>';
} else {
$data['body_formatted'] = $data['body'];
}
return $data;
} ?>
setup.php
<?php //Setup File
error_reporting(0);
include ('../Config/connection.php');
//Constants DEFINE('D_TEMPLATE' , 'Template');
//Functions include('Functions/data.php'); include('Functions/template.php'); include('Functions/sandbox.php');
$debug = data_setting_value($dbc, 'debug-status');
$site_title = 'Site Under Construction';
if(isset($_GET['page'])) { $page = $_GET['page']; // Set $pageid to equal the value given in url } else { $page = 'dashboard'; // Set $pageid equal to 1 or Home Page }
//Page Setup include('Config/queries.php');
$user = data_user($dbc, $_SESSION['username']);
?>
Hi,
I cheated and pulled the source from repository now all working.
Cheers, Paul
Haha, its not cheating ;-)
You might try using a compare tool sometimes when things like this come up. That way you can see what you did incorrectly.
compare tool?
My Users have disappeared the spaces are there but nothing in them other than a comma. I click on the user space and it populates the form. This is after creating the user page.