i am getting this error on my page and cant not figure it out
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wwwpopw/public_html/ivite/checkuser.php on line 1
please try to help me out, this is really pissing me off. your help is much appreciated!!!
--here is the checkuser php code
<?PHP
include "config.php";
// Conver to simple variables
$userName = $POST['userName'];
$password = $POST['password'];
if((!$userName) || (!$password)){
echo "Please enter ALL of the information! <br />";
include "$incdir/loginform.php";
include "$incdir/footer.php";
exit();
}
// Convert password to md5 hash
$password = md5($password);
// check if the user info validates the db
$sql = mysql_query("SELECT * FROM users WHERE userName='$userName' AND password='$password' AND activated='1'");
$login_check = mysql_num_rows($sql);
if($login_check > 0){
while($row = mysql_fetch_array($sql)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
// Register some session variables!
session_register('suserName');
$SESSION['suserName'] = $userName;
session_register('sfirstName');
$SESSION['sfirstName'] = $firstName;
session_register('slastName');
$SESSION['slastName'] = $lastName;
session_register('semailAddress');
$SESSION['semailAddress'] = $emailAddress;
session_register('loggedIn');
$SESSION['loggedIn'] = 1;
session_register('suserId');
$SESSION['suserId'] = $userId;
mysql_query("UPDATE users SET lastLogin=now() WHERE userId='$userId'");
header("Location: home.php");
}
} else {
include "header.php";
echo "You could not be logged in! Either the username and password do not match or you have not validated your membership!<br />
Please try again!<br />";
include "$incdir/loginform.php";
include "$incdir/footer.php";
exit();
}
?>
--end check user code
--------------------------------------
--here is the config.php code
<?
/ Database Information - Required!! /
/ -- Configure the Variables Below --/
$dbhost = 'localhost';
$dbusername = 'name';
$dbpasswd = 'pw';
$database_name = 'name';
//Admins username
$adminusername ="ivite";
//install directory
$installdir = "http://www.domain.com/ivite";
//DO NOT INCLUDE A TRAILING SLASH
//Footer Message
$footermessage = "iVite 2004";
//Site Name
$sitename = "Ivite";
//PayPal email address
$paypalemail ="glen@coakley-baker.com";
//Name which user registration emails will be from
$emailfromname = "Ivite Admin";
$emailfromemail = "glen@coakley-baker.com";
//table colors
$headercolor = "#333333";
$headertext = "#eeeeee";
$color1 = "#eeeeee";
$color2 = "#cccccc";
$incdir = "/var/www/html/ivite/inc";
//Subject line of email that gets sent to users telling them they have been invited to an event
//The events Host's Name will be placed before your custom subject line
//EXAMPLE: $sentIviteSubject = "bla blab bla has sent you an Ivite";
$sentIviteSubject = "has sent you an Ivite";
//DO NOT INCLUDE ANY QUOTATION MARKS!!
//Message sent to users telling them they have been invited to an event
//This is a sort of generic message. You will have the ability to add a custom message when you create the iVite itself
$sentIviteMessage = "You have been invited to ".$_POST['eventTitle'].".\n\n";
//DO NOT INCLUDE ANY QUOTATION MARKS!!
/ Database Stuff, do not modify below this line /
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd")
or die ("Couldn't connect to server.");
$db = mysql_select_db("$database_name", $connection)
or die("Couldn't select database.");
?>
--end config code
---------------------------------
--header.php code
<?PHP
session_start();
header("Cache-control: private");
$admincheck = $SESSION['suserName'];
if(!$SESSION['loggedIn'])
{
header("Location: login.php");
exit();
}
include "config.php";
include "$incdir/functions.php";
$navSelect = basename ($PHP_SELF, ".php");
?>
<html>
<head>
<title><?PHP echo "$sitename"; ?></title>
<link rel="stylesheet" type="text/css" href="style.css">
<script language="JavaScript">
function openAWindow( pageToLoad, winName, width, height, center) {
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only
window.open( pageToLoad,winName,args );
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements.type == "text") || (field.elements.type == "textarea") || (field.elements.type.toString().charAt(0) == "s")) {
document.forms[0].elements.focus();
break;
}
}
}
}
// End -->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<?PHP
if( $admincheck != $adminusername )
{
echo"<body bgcolor=\"#FFFFFF\" onLoad=\"MM_preloadImages('images/home-Active.jpg','images/myIvites-Active.jpg','images/myaccount-Active.jpg','images/logout-Active.jpg'),MM_swapImage('$navSelect','','images/$navSelect-Active.jpg',1),placeFocus()\">";
}else{
echo"<body bgcolor=\"#FFFFFF\" onLoad=\"MM_preloadImages('images/home-Active.jpg','images/ivites-Active.jpg','images/addivites-Active.jpg','images/users-Active.jpg','images/myaccount-Active.jpg','images/settings-Active.jpg','images/logout-Active.jpg'),MM_swapImage('$navSelect','','images/$navSelect-Active.jpg',1),placeFocus()\">";
}
?>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><img src="images/logo.jpg" hspace="0" vspace="5"></td>
</tr>
</table><br>
<?PHP
if( $admincheck != $adminusername )
{
include "$incdir/usermenu.php";
}
else
{
include "$incdir/adminmenu.php";
}
?>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#848484">
<tr>
<td align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td align="left" bgcolor="#eeeeee"><img src="images/nav-fade.jpg" width="688" height="2"></td>
</tr>
<tr>
<td align="center" bgcolor="#eeeeee"><br>
<table width="600" border="0" align="center" cellspacing="0" cellpadding="1">
<tr>
<td align="center" valign="top" bgcolor="#000000">
<table width="600" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="left">
---------------------------------
---end header.php code