Jump to content

[SOLVED] Parse error


Zepo.

Recommended Posts

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/burly/public_html/dev/admin/head.php on line 14

 

 

In

 

<?php 
session_start(); 

if (isset($_SESSION['name'])) {
echo "<html>
<head>
<title>Info</title>
<link type='text/css' rel='stylesheet' href='./css/manage.css' />
</head>

<body style='margin:0px' class='info_body'>
<table border='0' width='100%' height='100%'>
<tr align='center' valign='top'>
	<td style='text-align:left'><b>Extreme Gaming Ladder Control Panel</b> (EGL 1.0) - $_SESSION['name']</a></td>
	<td style='white-space:nowrap; text-align:right; font-weight:bold'>
		<a href="./admin.php" target="frame_main">Main</a>
		|
		<a href="../index.php" target="_blank">Home Page</a>
		|
		<a href="./logout.php" onClick="return confirm('Are you sure you want to log out of the control panel?');" target="_top">Log out</a>
	</td>
</tr>
</table>
</div>
</body>
</html>; 
}else{
echo "
You are not logged in!
";
}

?> 

Link to comment
https://forums.phpfreaks.com/topic/56589-solved-parse-error/
Share on other sites

New Error

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/burly/public_html/dev/admin/head.php on line 6

 

 

New file

<?php 
session_start(); 

if (isset($_SESSION['name'])) {
echo '<html>
<link type='text/css' rel='stylesheet' href='./css/manage.css' />
<body style='margin:0px' class='info_body'>
<table border='0' width='100%' height='100%'>
<tr align='center' valign='top'>
	<td style='text-align:left'><b>Extreme Gaming Ladder Control Panel</b> (EGL 1.0) </a></td>
	<td style='white-space:nowrap; text-align:right; font-weight:bold'>
		<a href='./admin.php' target='frame_main'>Main</a>
		|
		<a href='../index.php' target='_blank'>Home Page</a>
		|
		<a href='./logout.php' onClick='return confirm('Are you sure you want to log out of the control panel?');' target='_top'>Log out</a>
	</td>
</tr>
</table>
</div>
</body>
</html>'; 
}else{
echo '
You are not logged in!
';
}

?> 

Link to comment
https://forums.phpfreaks.com/topic/56589-solved-parse-error/#findComment-279477
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.