Jump to content

Secure Register Project


justinede

Recommended Posts

Hello All,

 

I want to start this project for my school that is basically a whole Social Networking Web Site only for the school. When someone wants to register they have to fill in there first and last name and ID number. Once they hit Register, I want the script to check the first and last name with the ID number they gave and see if its valid. If it is, there account is made. But if it isn't they cant make an account. This is basically making sure people from outside the school cant make an account. I would get the list of names and id numbers from my school and have to put them into a database.

Link to comment
Share on other sites

is this a project that is supported by your school and if so is it on school servers.

if so your school properly has a database that they could allow you access to that contains that kind of thing and is updated when new students come in or old ones leave

 

Scott.

Link to comment
Share on other sites

$result = mysql_query(sprintf("SELECT `firstName`, `lastName` FROM `iddb` WHERE `id` = '%s'",mysql_real_escape_string($_REQUEST['id'])));
if ($a = mysql_fetch_assoc()) {
  if ($a['firstName'] == $_REQUEST['firstName'] && $a['lastName'] == $_REQUEST['lastName']) {
    // valid name ID
  }
  else {
    // invalid name
  }
}

Link to comment
Share on other sites

no this isnt supported by the school, but the school has their information an a public network drive and i downloaded the list of the current students and their ID numbers. so all i have to do is import that into a database and add a line of code the this Social Networking Site I downloaded.

Link to comment
Share on other sites

If you know basic PHP and MySQL then this should be easy.

 

$firstname = mysql_real_escape_string($_POST['firstname']);
$lastname = mysql_real_escape_string($_POST['lastname']);
$studentid = mysql_real_escape_string($_POST['studentid']);

$query = mysql_query("SELECT * FROM `students` WHERE firstname='{$firstname}' AND lastname='{$lastname}' AND studentid='{$studentid}'");
$num = mysql_num_rows($query);

if ($num == 1) {
     // is a student
} else {
    // not a student
}

Link to comment
Share on other sites

If you know basic PHP and MySQL then this should be easy.

 

$firstname = mysql_real_escape_string($_POST['firstname']);
$lastname = mysql_real_escape_string($_POST['lastname']);
$studentid = mysql_real_escape_string($_POST['studentid']);

$query = mysql_query("SELECT * FROM `students` WHERE firstname='{$firstname}' AND lastname='{$lastname}' AND studentid='{$studentid}'");
$num = mysql_num_rows($query);

if ($num == 1) {
     // is a student
} else {
    // not a student
}

 

oh true that :o why didn't I include firstName and lastName into the query? :( lol

Link to comment
Share on other sites

I think its spelled pedofile, and yeah its a pretty good idea, but I don't really think your school would condone this, as the schools already block myspace, facebook, etc.. This would be just another distraction for children in computer/technology classes, in class on sidekicks, psps, cellphones. The schools wouldn't approve, but the kids might enjoy it.

Link to comment
Share on other sites

oh yeah.. didnt think about that. any suggestions on how to stop this..

well also, most people only know their own ID numbers. Their ID number is assigned to them once they hit elementary school and sticks with them through public school. I only know mine by heart and the list I found was hard to find.

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.