Hello,
i want to implement user authorization to my files.
I just want to display a simple log in page where the user enters the user name and password and if the user name and password is matched in my table, it then re-directs to the page i mentioned else it gives me an error.
I used the followin code, but it does'nt work.could some body pls tell me where the error is.
thx
<?php
include "dbconnection.oam";
$sql = 'SELECT USER_ID from TBL_USER WHERE USER_NAME = '$user' AND USER_PASSWORD = '$pass'';
$result = ibase_query($sql);
$number_results = ibase_num_fields($result);
if($number_results < 1)
{
echo"<form action=\"$PHP_SELF\" method=\"POST\">\n";
echo"<input type=\"text\" name=\"user\" size=\"13\"><br>\n";
echo"<input type=\"password\" name=\"pass\" size=\"13\"><br>\n";
echo"<input type=\"submit\" value=\"verify\">";
echo"</form>";
}
else
{
header ('location: main.php');
}
?>