Help please - How to validate from 2 possible answers


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair trying to get my head round it.

I've got a contact form and I would like to add to it a couple of simple human check questions like "what is 1 + 1?". I've got it to work with the answer being '2' but what i would like to do is have it also validate if the visitor enters 'two'.

This is how I did it for just the number '2'

Code: [Select]if (Trim($Human_check_1)!="2") $validationOK=false;
Could somebody please tell me how I can code it so "if Human_check_1 is equal to '2' or it is equal to 'two' the validation is true"

Thanks

No comments posted yet

Your Answer:

Login to answer
105 Like 41 Dislike
Previous forums Next forums
Other forums

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

Any meaningful project for a new C++ programmer?
I want to do some meaningful program, so I can help myself to learn

Assume I know the fol

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

why is it over writing
Code: $filepaths[] = $_FILES['new_image'];
foreach ($filepaths as $filepath)
{
$imagename =

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash