science-ation/register_participants.inc.php
james 29a5c412a4 Finish update and insert code for new students
Still need a way to remove students
Add TODO
2004-12-03 15:38:37 +00:00

26 lines
533 B
PHP

<?
function studentStatus()
{
global $config;
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade");
$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)
{
return "incomplete";
}
}
}
//if it made it through without returning incomplete, then we must be complete
return "complete";
}
?>