forked from science-ation/science-ation
26 lines
554 B
PHP
26 lines
554 B
PHP
<?
|
|
function studentStatus()
|
|
{
|
|
global $config;
|
|
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","age");
|
|
|
|
$q=mysql_query("SELECT * FROM students WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
|
|
|
|
while($r=mysql_fetch_object($q))
|
|
{
|
|
foreach ($required_fields AS $req)
|
|
{
|
|
if(!$r->$req || $r->$req==0)
|
|
{
|
|
return "incomplete";
|
|
}
|
|
}
|
|
}
|
|
|
|
//if it made it through without returning incomplete, then we must be complete
|
|
return "complete";
|
|
}
|
|
|
|
|
|
?>
|