Zubrag.com
November 18, 2018, 10:53:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Hello every one  (Read 2987 times)
caslas
Newbie
*
Posts: 1


« on: September 10, 2013, 07:08:57 AM »

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..

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";
}

?>

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC