forked from science-ation/science-ation
Oops use the right POST vars and the right function names
This commit is contained in:
parent
fa2a70b470
commit
dca4872481
@ -81,11 +81,13 @@ echo mysql_error();
|
||||
else {
|
||||
//first, lets make sure this emergency contact really does belong to them
|
||||
foreach($_POST['ids'] AS $id)
|
||||
{ $q=mysql_query("SELECT * FROM emergencycontact WHERE id='$id' AND registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
|
||||
{
|
||||
$q=mysql_query("SELECT * FROM emergencycontact WHERE id='$id' AND registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
|
||||
if(mysql_num_rows($q)==1) {
|
||||
$e=stripslashes($_POST['email']);
|
||||
if($_POST['relation']=="Parent" && $e && user_valid_email($e)) {
|
||||
if($u=user_load_by_username($e)) {
|
||||
$e=stripslashes($_POST['email'][$id]);
|
||||
if($_POST['relation'][$id]=="Parent" && $e && user_valid_email($e)) {
|
||||
echo "Updating parent record...";
|
||||
if($u=user_load_by_email($e)) {
|
||||
$u['firstname']=stripslashes($_POST['firstname'][$id]);
|
||||
$u['lastname']=stripslashes($_POST['lastname'][$id]);
|
||||
$u['phonehome']=stripslashes($_POST['phone1'][$id]);
|
||||
|
Loading…
Reference in New Issue
Block a user