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
161 Like 5 Dislike
Previous forums Next forums
Other forums

how can i display php source code snippets ?
I am outputting some pho code .. and I want to display the source code so people can copy and paste

2 decima places & How to reload my page
Hello There,

How do i put full-stop (.) after second figure from behind? ie if i have 123456

modifying a property of an object from a different class
I have 2 classes:
- Math
- Distance

in my math class, I have this line:
$distance =

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

BackButton Behaviour in AJAX
I have an ASPX Page AJAX Enabled!The page has a gridView and a DDL for filtering on it. The Gridview

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

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