Whenever I enter a number eg: "123" or "12345", if it is in SQL database, then the result is published, but whenever I try to enter a TEXT or STRING (eg: "AJAY", "12A"), even if it is in my database, the value doesn't matches and an error is reported
Also the pan attribute is VARCHAR
in MySQL database
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\auth.php on line 18
Here is my CODE:
<?php
session_start();
$pan = $_POST["pan"];
$con = mysql_connect("localhost","root","");
if(! $con)
{
die('Connection Failed'.mysql_error());
}
mysql_select_db("e1",$con);
$result = mysql_query("SELECT pan FROM form1 WHERE pan=$pan");
$values = mysql_fetch_array($result);
echo $values['pan'];
?>