FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Php parsing error! Need help





warallthetm
I have a script that lets me ad memebers and password protects my memebers page. The signup and stuff worked fine, but when i try to login it gives me this error:
Code:
Parse error: syntax error, unexpected $end in /home/warallth/domains/sk8te.frih.net/public_html/logins/members.php on line 121

So i went in to dreamweaver and looked at line 121 but there was nothing wrong with it!
Here is the memebers page source:

<?php
include 'config.php';
$tmp = $_GET['action'];
if($tmp == "signout"){
$cookie_name = "auth";
$cookie_value = "";
$cookie_expire = "0";
$cookie_domain = $domain;
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);
header ("Location: http://" . $domain . $directory . "login.php");
}

$connection = mysql_connect($hostname, $user, $pass)
or die(mysql_error());
$db = mysql_select_db($database, $connection)
or die(mysql_error());

list($cookie, $tmpname) =
split("!", $_COOKIE[auth], 2);

if($cookie == "fook"){
$sqlcheckaccount = "SELECT username FROM $userstable
WHERE username = '$tmpname'";

$resultcheckaccount = mysql_query($sqlcheckaccount)
or die ("Couldn't execute query.");
$numcheckaccount = mysql_num_rows($resultcheckaccount);
if($numcheckaccount == 0){
echo "Error, Username doesnt exist.";
die;
}
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Members ONLY</title>
<style type="text/css">
<!--
body {
background-image: url(../images/checker.jpg);
}
body,td,th {
color: #FFFFFF;
}
.style1 {font-size: x-large}
-->
</style>
<SCRIPT language=JavaScript>
<!-- Begin

//Animated Window- By Rizwan Chand (rizwanchand@hotmail.com)
//Modified by DD for NS compatibility
//Visit http://www.dynamicdrive.com for this script

function expandingWindow(website) {
var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7; // horizontal scrolling speed (higher = slower)
var leftdist = 10; // distance to left edge of window
var topdist = 10; // distance to top edge of window

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}
// End -->
</SCRIPT>

</head>

<body>
<div align="center">
<table width="922" height="442" border="1" bordercolor="#FF0000">
<tr>
<th width="905" height="200" scope="col"><p><img src="../images/Skate.jpg" width="905" height="100"></p>
<p align="center"><img src="../images/bar_copy.jpg" width="900" height="50" border="0" usemap="#Map"></p></th>
<th width="8" scope="col">&nbsp;</th>
</tr>
<tr bgcolor="#000000">
<th height="234" scope="row">Welcome to the Sk8te.ru.tf Main page! </th>


<iframe src="black.html" name="body" scrolling="auto" frameborder="no" align="center" height = "300px" width = "920px">
</iframe>

<td>&nbsp;</td>
</tr>
</table>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<map name="Map">
<area shape="rect" coords="2,0,168,48" href="#" onClick="expandingWindow('/files/flv_player/index.php');return false">
<area shape="rect" coords="169,2,387,48" href="upload.php" target="body">
<area shape="rect" coords="389,1,544,48" href="news.php" target="body">
<area shape="rect" coords="760,0,897,48" href="http://www.sk8te.ru.tk">
<area shape="rect" coords="545,1,758,47" href="rfr.php" target="body">
</map>
</body>
</html>

Can anyone Help?????
Kaneda
You're missing the closing bracket of the line

Code:

if($cookie == "fook"){


That's why end-of-file ($end) is unexpected according to the parser. It's still waiting for you to close that if statement Wink
warallthetm
Thank you!!! Very Happy Very Happy Very Happy
Related topics
ASPX XML parsing error help
Please can anyone help with a php script error/problem?
[RESOLVED] php-nuke error?
PHP/Blogger error
php..free account help
Help: SQL error after uploading new files(thread updated)
simple php problem, please help...
php script in php nuke - need help!
PHP DB Error: syntax error
php-nuke - Forum Help (phpbb)
phpBB gives error - Help needed urgently
PHP Help
Uploading a .php file! NEED HELP thanks
Internal Server Error, what can I do?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.