Jump to content

How to verify 44 fields at once???!!!!


Thauwa

Recommended Posts

Hello people, I am having trouble trying to do this:

 

I have two forms, form1 and form2, and each has 22 fields.

They are to contain some names.

 

How could I check:

 

1. whether the same name is entered in two or more fields in form1

2. whether a name is repeated once in form1, then in form 2

 

what my point is that each entry should be unique, how could I do it with php?

 

Just explaining the principles used will be fine, don't bother with any coding!

 

 

Thanks and Regards,

Thauwa

 

P.S. I need the verification to happen online and not in any DB, and I have confused myself with ARRAYS.

Thanks for any help you will give me!

Link to comment
Share on other sites

i can't remember the exact function names at the moment. But consider on posting the form data saving the inputs in an array within a session. Assuming you go from form 1 to form 2 storing them in a session per form is ideal I would suppose as they will be floating around waiting to be pulled back down and checked.

 

Anyway on posting form1 you build the array to store as a session. Where while building the array you double check to see if theres any doubles. If there is kick back an error or remove them, and do as you want, if not store it in a session for later retrieval. Repeat the concept with form2.. then afterward cross reference array1 and array2 to see if there is any doubles. if there is throw out an error or do what it is you want to do.

 

I know thats rather a crude simplistic explanation of the process I wish I could help you better but I am currently fried myself at the moment. Although you did say give the principals its basic in concept but hope it helps anyway.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.