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

MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

If a record matches an existing record do nothing
So I don't know if I should put this here or in mysql, but what my script is for is for people to ad

Why use OOP?
Can someone explain to me why I should use OOP instead of procedure based code.

Im building a

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

need help in creating captcha
hi i have a problem creating captcha system. i create some basic script for image displaying but it

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