Location: PHPKode > projects > Radtracker > radtracker/checkuser.php
<?php
//Matches up the username and password
function checkuser($user, $password) {
global $connection;
  $db = mysql_select_db("radTracker", $connection) or die ("Couldn't connect to DB Radtutor");
  $sql_command = "SELECT * FROM personnel WHERE Name = '$user'";
  $sql_result = mysql_query($sql_command,$connection) or die (mysql_error());
  while ($row = mysql_fetch_array($sql_result)) {
    $tuser = $row["Name"];
    $tpass = $row["Password"];
    if ($tuser == $user && $tpass == $password) {
      $userstatus = "isvalid";
    }
  }
  return $userstatus;
} 

?>
Return current item: Radtracker