From: raghavendra6152 at gmail dot com
Operating system: windows xp
PHP version: 5.2.6
PHP Bug Type: Session related
Bug description: I am getting the bug and i am begginer
Description:
------------
I have prepared for the login data but i am getting bug like Parse error:
syntax error, unexpected $end ....Kindly check on this and revert
Reproduce code:
---------------
<? session_start()?>
<html>
<head>
<title>login </title>
</head>
<body>
<h2>login</h2>
<?
$links="<a href='main.php'>click to </a><br><br><a
href='logout.php'>click</a>";
if($user&&$pass){
if($logged_in_user==$user){
echo $user.",you are already logged in.<br><br>";
echo $links;
exit;
}
$db=mysql_connect("localhost");
mysql_select_db("RAGHU",$db);
$result=mysql_query("SELECT * FROM FRUIT WHERE name ='".$user."' AND
password= PASSWORD('".$pass."')");
if(!$result){
echo "sorry, there has ben hitch";
exit;
}
if(mysql_num_rows($result)>0){
$logged_in_user = $user;
session_register("logged_in_user");
echo "welcome,".$logged_in_user.".<br><br>";
echo $links;
exit;
}
else
{
echo "invalid login ,please try again<br><br>";
}
?>
<FORM METHOD=POST ACTION="login.php">
Your username:
<input name="user" type=text maxlength=20 size=20>
<br>
your password:
<input name="pass" type=password maxlength=10 size=10>
<br>
<input type=submit value="login">
</body>
</html>
Expected result:
----------------
Login input and password input with the submit button....
--
Edit bug report at http://bugs.php.net/?id=44932&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44932&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44932&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44932&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44932&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44932&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44932&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44932&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44932&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44932&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44932&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44932&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44932&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44932&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44932&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44932&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44932&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44932&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44932&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44932&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44932&r=mysqlcfg