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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

http to https
Hi,

Is there any specific method/condition to move an http:// page to https:// ?

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

undefined offset help
Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Email Form Syntax Issue
I need the TO: in email to display To: CEO instead of To: abc@mail.com

How to alter the scri

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

puting for loop in 1 value
hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i

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