I am in the process of making a simple template system using PHP (the reason being to the website be easier to update when something needs to be changed or added to the Navigation Bar).
I am basically just using an IF statement and GET function.
Code: Select all
<?php
if ($_GET[‘Name’] == "")
{
include(“home.inc”);
}
else
{
include(“$_GET[‘Name’].inc”);
}
?>I decided to use an IF statement so that the normal index.php would load up the home.inc file. However, this at the moment Is not working at all. The error I am recieving is as follows.
Parse error: parse error, unexpected T_VARIABLE in /home2/dordor/public_html/vta_test/index.php on line 264
LINE 264 Being: include(“$_GET[‘Name’].inc”);
If you guys could offer some help that would be great cheers
PS: I don't even know if the IF statement thing I am trying will even work as the varible might not even exist??