I have a problem when I create a login form. Please help.
I have a simple form login.htm which has 2 fields: username & password and 1 button to login. The login.htm form has action="login.php" which has the code below:
<?php
if(!empty($_GET["txtUserName"])&& !empty($_GET["txtPassword"])){
$Username= $_GET["txtUserName"];
$Password= $_GET["txtPassword"];
$con = mysql_connect("localhost","root","" ) ;
mysql_select_db("anle",$con) ;
$sql_select = "select * from contact where Password='$Password'" ;
$result=mysql_query($sql_select,$con);
echo ($result) ;
if($result!=" " ){
echo ("Your password or User name is not correct" ) ;
}else{
echo("Welcome" ) ;
}
mysql_close();
}else{
echo ("Please input all information" ) ;
}
?>
When I run the login.htm, fill all the fields on it and click the login button, it appears a message
Problem signature:
Problem Event Name: APPCRASH
Application Name: httpd.exe
Application Version: 2.2.11.0
Application Timestamp: 493f5d44
Fault Module Name: php_mysql.dll
Fault Module Version: 5.3.0.0
Fault Module Timestamp: 4a492311
Exception Code: c0000005
Exception Offset: 00002072
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1066
Additional Information 1: c7db
Additional Information 2: ae42b9a901477bc30e02003a5e74faf8
Additional Information 3: e910
Additional Information 4: a1813aab827d72a47d7b80b5e48f9ba2
Read our privacy statement:
[
go.microsoft.com]
What the problem do I have? Please help me resolve it....(^_^)