Below is the code for a simple php file with some functions that run perfectly happily when the inside of the php tag is commented out. isLoggedIn() is a function that I know is coded correctly in the session.php file as it is used elsewhere and works.
For some weird reason, firefox console is telling me there is a syntax error on line 1:
[00:11:56.115] SyntaxError: syntax error @ admin_script.php:1
Any help would be greatly appreciated!
<?php
include('../includes/session.php');
if(isLoggedIn() == false)
{
header('HTTP/1.0 404 Page Not Found');
}
?>
$(document).ready(function(){
/* All the JS code here for the admin page to be sent to the HTML.
Two functions, one needs to provide the sections to the "editor-sections" div and another the content to the "editor-content" div.
*/
$('button[id=exercises_button]').click(function(){
exercise_editor();
});
$('button[id=problems_button]').click(function(){
problems_editor();
});
var exercise_editor = function(){
window.alert("Exercise button clicked");
};
var problems_editor = function(){
window.alert("Problems button clicked");
};
});
Thank you!