justinede Posted January 10, 2009 Share Posted January 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted January 10, 2009 Share Posted January 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 10, 2009 Share Posted January 10, 2009 $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 } } Quote Link to comment Share on other sites More sharing options...
justinede Posted January 10, 2009 Author Share Posted January 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
dclamp Posted January 10, 2009 Share Posted January 10, 2009 Do you actually know how to code in PHP with MySQL? Let alone the skills of programming? Sorry to come off as, mean, but a social network is a very large task. Quote Link to comment Share on other sites More sharing options...
justinede Posted January 10, 2009 Author Share Posted January 10, 2009 I know enough to understand what I'm looking at. Quote Link to comment Share on other sites More sharing options...
dclamp Posted January 10, 2009 Share Posted January 10, 2009 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 } Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 10, 2009 Share Posted January 10, 2009 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 why didn't I include firstName and lastName into the query? lol Quote Link to comment Share on other sites More sharing options...
justinede Posted January 10, 2009 Author Share Posted January 10, 2009 thanks guys, i will try this. wish me luck. thanks. anyway dont you think its a good idea? you know how parents are always obsessed with internet petifiles, this eliminates this. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 10, 2009 Share Posted January 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
justinede Posted January 10, 2009 Author Share Posted January 10, 2009 haha yeah woops spelling mistake... yeah i guess, this would be more like an at home thing. Quote Link to comment Share on other sites More sharing options...
Rushyo Posted January 10, 2009 Share Posted January 10, 2009 There is a pretty significant problem with that system. One person can just register an account for anyone they want inside the school and pretend to be them. Quote Link to comment Share on other sites More sharing options...
justinede Posted January 10, 2009 Author Share Posted January 10, 2009 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. Quote Link to comment Share on other sites More sharing options...
dclamp Posted January 10, 2009 Share Posted January 10, 2009 I think its spelled pedofile pedophile Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.