Hello every one

Started by caslas, September 10, 2013, 04:08:57 PM


Pls i need your help.i have a project 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..

$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);

$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['student_id'] = $student_id;
   header('Location: student/index.php');
   echo "Invalid ID number or Username";