...

View Full Version : unexpected $end on ... at line 49



Ramesiv
01-05-2006, 01:33 AM
Ok, this error has been driving me crazy, my server returns this error:

Parse error: syntax error, unexpected $end in c:\program files\e-novative\WAMP\www\my_homepage_beta\check_queryString.phpon line 49

Although, no matter how long I look at the code (and now I've got a head ache) I can't find where the error is, here is the code for the check_queryString.php:



<?php
function build_session_info() {
$info_array = array(
"session_id" => $_SESSION["sess_cookie"]["phpsessid"],
"web_id" => $_SESSION["sess_cookie"]["web_id"],
"browser" => $_SESSION["sess_cookie"]["browser"],
"remote" => $_SESSION["sess_cookie"]["remoteaddr"]
);
$sess_id = "Session Id: <b>".$info_array["session_id"]."</b><br />";
$web_id = "Website Id: <b>".$info_array["web_id"]."</b><br />";
$browser = "Browser Info: <b>".$info_array["browser"]."</b><br />";
$remote = "Remote Address: <b>".$info_array["remote"]."</b><br />";

$string = $sess_id.$web_id.$browser.$remote;

echo $string;
}
function build_news() {
echo "
<div class=\"news_head\">
Top News
</div>
<div class=\"connect\">
No News
</div>
";
}
function check_queryString() {
$q = $_REQUEST["q"];
if ( isset ( $_REQUEST["q"] ) ) {
if ( $q == "info" ) {
build_session_info();
}
else if ( $q == "news" ) {
build_news();
}
else if ( $q == "logout") {
if ( isset ( $_SESSION["LOGIN"]["UNVALID"] ) ) {
if ( $_SESSION["LOGIN"]["UNVALID"] == "UNVALID" ) {
unvalid_Logout();
}
else {
` check_Logout();
}
}
}
}
}
?>


Note, this page is linked to a larger network so I'm guessing there might be an error in the code of another page, but then it would return an error on that page right :confused: ?

Any help in this would be great because my 14 yr old head is about to explode, thanks for reading.

thesavior
01-05-2006, 01:55 AM
did you try to find where you define $end and use it?

marek_mar
01-05-2006, 01:55 AM
Remove the backtick (`).

Ramesiv
01-05-2006, 02:00 AM
OMG, sorry i wasted your time, i cant beleive i missed that. Thanks anyway.

marek_mar
01-05-2006, 02:33 AM
You could use a bigger font :p .
BTW thesavior,
that $end is not a variable. PHP just found the end of it's code before it should... in the middle of a string.

thesavior
01-05-2006, 03:25 AM
oh...okay...thanks for letting me know.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum