Open 3c75 opened 10 years ago
Yeah you cannot have this:
function data_page($dbc, $id){
$q = "SELECT * FROM pages WHERE id = '$id'";
$r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
return $data;
}
Twice anywhere in your code. So make sure you don't. Look at all files that are included() and make sure you dont have that chunk of code anywhere else.
I skipped the nav section, kept the links that are generated hard coded. Then needed slugs, so went back to make nav dynamic. Realised I didnt make 'label' column, made it. Sorted the code. Ran it to see this ugly thing: Fatal error: Cannot redeclare data_page() in admin\functions\data.php :(
Here is that particular code: