php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44932 I am getting the bug and i am begginer
Submitted: 2008-05-07 08:20 UTC Modified: 2008-05-07 08:25 UTC
From: raghavendra6152 at gmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.6 OS: windows xp
Private report: No CVE-ID: None
 [2008-05-07 08:20 UTC] raghavendra6152 at gmail dot com
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....


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-07 08:25 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 10 19:01:35 2024 UTC