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

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

Undefined variable: adHTML
Hello:

While checking my site error logs, I've noticed one repetitive error that fills the lo

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

Calling All PHPFREAKS Blackberry Users
Are you a member of PHPFreaks and have a blackberry? Well RIM just recently released Blackberry Mes

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

PHP and XML image gallery variable issue
I'm trying to display the large image on the same page as the thumbnails, to do that I'm passing a v

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

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