validate arrays

Discussion in 'Programming' started by kabucek, Nov 19, 2008.

  1. #1
    ok now I got this to work with arrays
    but I don't know how to setup in such way,
    when first array is ok, it goes to the next one.


    [PHP]<?
    
    
    
    
    
    
    
    // I have   2 arrays and want them to do:
    //   - if one is complete go to next:
    
    
    
    
    // array 1  \\
    
    
    
         	if ($checkMemberArray)
    
    
                              	{
    
    
    		
    								
    								 $cemailAdr=strtolower($checkMemberArray['emailAdr']);
    			
    
                   			 $memailAdr=strtolower($memberDataArray['emailAdr']);
    								
    
    
    
                             	if ($cemailAdr!=$mcemailAdr )
                				
                				
                					{
    
    
    
    
    
    										$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']="Email Already registered";
    
    										$processMsg.="
    
    											<DIV class=processMsgError>
    
    												.<P>
                                                                Our records shows that this email has been registered for this event <P>
                                                                Please provide different email address
    
    												</DIV>
    
    											";
    
    										}
    
    
      //end of array 1  \\
    
    
    
      // array 1  \\
    
    
            		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>
    
    											Email doesn't match our records. It has been registered already with different First & Last Name<P>
    
    										   There needs to be different f.name and l.name for each of the registrants
    
    												
    
    												</DIV>
    
    											";
    
    										}
    
    									else
    
    										{
    
    											$memberDataArray['first']=$checkMemberArray['first'];
    
    											$memberDataArray['last']=$checkMemberArray['last'];
    
    											}
    
    								}
    
    						}
    
    
    
    
        //end of array 2  \\
    
    
    
    
    
    
    
    
    
    
    ?>[/PHP]
    Code (markup):

     
    kabucek, Nov 19, 2008 IP
  2. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You realize there's nothing in the code box but the initial comment, right?
     
    garrettheel, Nov 19, 2008 IP
  3. kabucek

    kabucek Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    please delete this post !
     
    kabucek, Nov 19, 2008 IP
  4. paitken

    paitken Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    wow did you figure it out
     
    paitken, Nov 19, 2008 IP