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 form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

Count on multidimensional array
Hi, i got an array as below:

Array
(
=> Array
(

Display a default image
I am trying to display generic image for items that don't have one, but I can't get it to display.

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

Problems with strings containing
Hey all,

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

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

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