I'm trying to build my app with a MVC pattern, to do that I followed a book. In my index.php
page I have a button, when I click on that button I want to call my formController to display a form, I'm trying to do that first just showing a simple text with <h1>
but it doesnt show any text just a blank page.
Index.php
<?php
//check for errors
error_reporting(E_ALL);
ini_set("display errors",1);
include_once "Models/PageData.php";
$pageData = new PageData();
$pageData->title = "OSeuCondómiono - Gere tudo apartir de uma única plataforma";
$pageData->bootstrap = "<link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'rel='stylesheet'>";
$pageData->jquery = "<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js'></script>";
$pageData->bootstrapScript = "<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'></script>";
$pageData->googleApiFont = "<link href='https://fonts.googleapis.com/css?family=Merriweather|Open+Sans|Oswald|Roboto'>";
$pageData->addCss("Css/style.css");
$pageData->content = include_once "Views/home.php";
$formButton = isset($_GET['form-nav']);
if($formButton){
$pageData->content = include_once "Controllers/loginFormCont.php";
}
$page = include_once "Views/layout.php";
echo $page;
?>
loginFormControler
<?php
return "<h1>HIIIII</h1>";
?>
that <h1>
doesn't display. I don't know why.