Added resource.php to handle ajax get requests so main.php can focus on handling post requests
Added resource.php to handle ajax get requests so main.php can focus on handling post requests