PHP Code Error (T_ENCAPSED_AND_WHITESPACE)

Hi Guys,

Please can someone help me i had this code and tried to edit it a little with my very limited PHP Knowledge!

Now i have got an error i cant fix!

Parse error: syntax error, unexpected ‘’’ (T_ENCAPSED_AND_WHITESPACE) in /home/user876/public_html/index.php on line 62

[code]

<?

$location=$_GET[‘location’];
if (empty($location)) { $location=‘home’;
changelocation($location);
function changelocation($location) {
include (‘header.html’);
include (‘logo.html’);

echo ’

<td width="950" align="center" valign="top" class="table">';
  switch ($location) { case 'home': 

include (‘home.html’);
break; case ‘anchors’: include (‘anchors.html’);
break; case ‘juniors’: include (‘juniors.html’);
break; case ‘company’: include (‘company.html’);
break; case ‘seniors’: include (‘seniors.html’);
break; case ‘girls’: include (‘girls.html’);
break; case ‘camp’: include (‘camp.html’);
break; case ‘calendar’: include (‘calender.php’);
break; case ‘church’: include (‘church.html’);
break; case ‘history’: include (‘history.html’);
break; case ‘camp2013’: include (‘camp2013.html’);
break; case ‘camp2014’: include (‘camp2014.html’);
break; case ‘camp2015’: include (‘camp2015.html’);
break; case ‘camp2016’: include (‘camp2016.html’);
break; case ‘openday’: include (‘openday.html’);

}
echo ’

'; include ('links.html'); echo '
'; include ('contact.html'); include ('friends.html'); include ('twitter.html'); include ('area.html'); echo '
'; { switch ($location) { case 'home': break; case 'anchors': include ('anchors-badges.html'); break; case 'juniors': include ('juniors-badges.html'); break; case 'company': include ('company-badges.html'); break; case 'seniors': include ('seniors-badges.html');
  	  break; case 'camp2014': include ('camp2013.html');
  	  break; case 'camp2015': include ('camp2014.html');
  	  break; case 'camp2016': include ('camp2015.html');
  	  break; case 'camp2017': include ('camp2016.html');
  	  break; case 'openday': include ('openday2010.html');
echo '</td>

?>[/code]

That isn’t a* simple fix. It is several simple fixes. You cannot have an opening anything ’ " { without closing it. That is the root of you problems. You also cannot mix HTML and PHP without some kind of separation.

[php]

switch ()

[/php] Just done now work

Sponsor our Newsletter | Privacy Policy | Terms of Service