Hi friends
please give solution for this error i have strugling for 2 days
i am getting this error in when i try to login server system... but my local (Xamp) system working fine
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/91/7287991/html/employeelogin/loginp.php on line 1
for this getting error i fixed white spaces cookies and escae functions also getting same error
plz give solution
index.php:-
=$_GET[<script type="text/javascript"></script><br><br><div class="empty" style="text-align:center;padding:10px;">Invalid username or password</div> <form name="login" method="post" action="loginp.php" onSubmit="return validate_login( );"> <table cellspacing="0" cellpadding="5" class="miniLogOn"> <tr> <td colspan="2"> <h1 class="welcome">Log on to Admin Dashboard</h1> <br /> </td> </tr>
<tr ><th class="dlg" valign="top">Username:</th><td class="dlg" >
<input type="text" name="user" id="sPerson" size="30" class="dlgText" style="width:180px" value="" />
</td></tr><tr ><th class="dlg" valign="top">Password:</th><td class="dlg" >
loginp.php:------
<?phpinclude "db.php";phpinfo();$username=$_POST["user"];
$password=$_POST["pass"];
$p=$password;
$username=mysql_real_escape_string($username);
$password=mysql_real_escape_string($password);
if(!isset($username)){
include "error.php";
exit();
}
if(!isset($password)){
include "error.php";
exit();
}
$password=md5($password);
$mysqlqry="select username,id,name,email from users where username='".$username."'and password='".$password."'";
$result = mysql_query($mysqlqry);
if (!$result)
{
header("Location:login.php?failed=1");
exit();
}
else{
$affected=mysql_num_rows($result);
if($affected == 1){$row = mysql_fetch_array($result);
$emailid=$row["email"];
$name=$row["name"];
$id=$row["id"];
setcookie("lu",$id,time()+10*3600);
header("Location:dashboard.php");
}
else{
?>
<?php
header("Location:login.php?failed=1");
}
}
?
>
DB.php:----
= mysql_connect(Unable to connect to the " . "database server at this time.</P>" . mysql_error());
exit();
}
if (! @mysql_select_db("sbsemployee") )
{
echo( "<P>Unable to locate the database at this time.</P>" );
exit();
}
?>
Thanks & Regards
Mallesh(Malleshsgd@gmail.com