Just when I got all excited after figuring it out =/
HTML Code:
// Start anti-spam feature
var obj = formobj.elements["anti-spam"];
if(obj) {
if(obj.value == "" || obj.value == null) {// Check for empty or null values
alertMsg += "What is 10+5?\n";// Enter field description to appear in dialog box
} else if(obj.value != "15" ) {
alertMsg += "Incorrect value for anti-spam\n";// Enter response for value other than 15
}
} else alert("The anti-spam field was not found");
// End anti-spam feature
What's the appropriate way to do it in PHP?
Bookmarks