Jump to content

validation for users when sign up for event2


kabucek

Recommended Posts

Hi @ll,

 

 

I have the following function to check when users register to our system.

It validates f.name, l.name and email address.

 

 

 


if (implode($errorArray)=='') 

				{

					$checkMemberArray=$memberLink->getRecordMatch('userID', $memberDataArray['emailAdr']);



					if ($checkMemberArray)

						{

							$cFirst=strtolower($checkMemberArray['first']);

							$cLast=strtolower($checkMemberArray['last']);

							$mFirst=strtolower($memberDataArray['first']);

							$mLast=strtolower($memberDataArray['last']);

							if ($cFirst!=$mFirst or $cLast!=$mLast)

								{

									$command="sendAccountMail"; $destPage=$PHP_SELF; $label="here";

										$quote="\"";

										$clickString="onClick=".$quote."document.$formName1.operation.value='$command'; document.$formName1.action='$destPage'".$quote;

										$hrefString="href='javascript:submitRoutine($quote$command$quote, $quote$formName1$quote)'";

										if (!$label) { $label=$command;}

										$$command="<A $hrefString $clickString>$label</A>";

									$errorArray['emailAdr']="Mismatch email and name";

									$processMsg.="

										<DIV class=processMsgError>

											The email address you entered today has been used in our system with a first and last name that are different than the ones you entered. <P>





											</DIV>

										";

									}

								else

									{

										$memberDataArray['first']=$checkMemberArray['first'];

										$memberDataArray['last']=$checkMemberArray['last'];

										}

							}

					}

 

 

 

How to update this code, so when users try to register even with the good credentials it will give the message:

 

" You are already registered for this event, if you continue you might be charged again".

 

If possible use query to connect with database?

 

 

 

 

 

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.