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

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

Warning: mysql_num_rows() supplied argument is not a valid MySQL result resource
This may be simple I just may need another pair of eyes..

When i get records back the below c

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Deleted Delivery but material wont return
We deleted a delivery but the material its still pending.

We made a reverse goods movemen

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

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