echo"Entering id $id failed.<br>\n".$sucsDB->ErrorMsg();
}else{
unset($query);
$query="update transactions set signupid = ? WHERE transactionID = ?";
$id=$id->fields['id'];
if(!$id){
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 3\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
}else{
$query="update transactions set signupid=? WHERE transactionID=?";
unset($attribs);
$attribs[]=$id;
$attribs[]=$transactionID;
if(!$sucsDB->Execute($query,$attibs)){
//ERROR
if(!$sucsDB->Execute($query,$attribs)){
$mode="error";
mail(
$error_email,
"SUSignup Error",
"An error occured in the susignup system at stage 4\n Love the signup system.\n\nP.S. The Error is:\n ".$sucsDB->ErrorMsg(),
"From: \"SUCS Admin\" <admin@sucs.org>"
);
print($sucsDB->ErrorMsg());
}else{
$smarty->assign("id",$id);
$smarty->assign("pass",$pass);
mail(
$array['emailAddress'].','.$sid.'@swansea.ac.uk',
"SUCS Signup Information",
"Thankyou for joining Swansea University Computer Society, your signup details are below;\nSignupID: $id\nSignup Password: $pass\nIf you have successfully completed signup immediately then you can disregard this message.\n\nSUCS Admin Team.",
<p>You appear to have completed this part of signup before, please check your emails for your signup ID and password. Alternatively click below to continue.</p>
<p>You appear to have already completed this step and registered with SUCS with the username <strong>{$username}</strong>.<br/>If you have forgotten your login password please email <ahref='mailto:admin@sucs.org'>admin@sucs.org</a> or drop by the SUCS room and find an admin.</p>
{else}
<h1>Error</h1>
An error occured during signup, please email <ahref='mailto:admin@sucs.org'>admin@sucs.org</a> for assistance.
An error occured during signup, please email, with as much information as you can provide,<ahref='mailto:admin@sucs.org'>admin@sucs.org</a> for assistance.