Jump to content

PHP coders help pls


caslas

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.