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:
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"> </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> </td>
</tr>
</table>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="center">
<p> </p>
<p> </p>
<p> </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?????
| 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"> </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> </td>
</tr>
</table>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="center">
<p> </p>
<p> </p>
<p> </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?????
