I am not sure what I am looking for to make this not case sensitive. I have this text field where the user needs to type the word "Yes" in the box. If they type the word "yes" in lower case it will give them the flag. I would like them not worry about case sensitivity. Here is my code
Would it be something like this?
<?php
if(JRequest::getVar('activity_level_agreement') != 'Yes')
return 'Sorry, failed to enter proper word in the Activity Agreement. Please enter the correct word.';
?>
Would it be something like this?
if(JRequest::getVar('activity_level_agreement') != 'Yes' !='yes')
return 'Sorry, failed to enter proper word in the Activity Agreement. Please enter the correct word.';
?>
Hi silentcid,
Please try
Bpb
Please try
<?php
$ala = JRequest::getVar('activity_level_agreement', '', 'post');
if ( strtolower($ala) != 'yes') {
return 'Sorry, failed to enter proper word in the Activity Agreement. Please enter the correct word.';
}
?>
Bpb
Hello Bob,
Thanks for the quick reply and your code works. I guess my assumption on what the code should of look was way off so I guess I'll have to hit up the text books again.
Thanks for the quick reply and your code works. I guess my assumption on what the code should of look was way off so I guess I'll have to hit up the text books again.
This topic is locked and no more replies can be posted.