Pls i need your help.i have a pxroject that am working on..i dont know if u can help me with the one time password.thus so that if a student tried to access his/her result,he needs to enter a pin and his/her id number...and he can only use the pin 5 times..here is my script..am not that mfamiliar with php..thank u..
and again,i dont know if its possible that i will just give out password to different student inform of a pin.so that any student can log in with any pin from the database..and automatically recognises the students id with pin together..like an e pin..thanks
and also the tables to create in my sql db...
include('admin/connection.php');
include('sanitise.php');
$student_id = sanitise($_POST['student_id']);
$password = sanitise($_POST['password']);
$qry = mysql_query("SELECT * FROM register_staff WHERE student_id = '$student_id' AND password = '$password'");
$count = mysql_num_rows($qry);
if($count==1)
$RemoveRS__query=sprintf("DELETE FROM register_staff WHERE username='%s' AND password='%s' LIMIT 1",
get_magic_quotes_gpc()? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc()? $password : addslashes($password));
mysql_query($RemoveRS__query, $rsLogin.php) or die(mysql_error());
{
session_start();
$_SESSION['student_id'] = $student_id;
header('Location: student/index.php');
}
else
{
echo "Invalid ID number or Username";
}
?>