CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 get_param case insensitive?

Print topic Send  topic

Author Message
Donna
Posted: 02/21/2002, 12:04 PM

I use the following php code to highlight each occurrence of the keyword in my search results. The only problem is, the highlights (not the returned records) are case sensitive. So, if the keyword is "man", then "man" will be highlighted but "Man" will not. Is there a parameter that can be set in the get_param line (or elsewhere) that will make the highlight case insensitive?

if (get_param("article_title") != "" )
{
$string_to_split = get_param("article_title");
$tok = split(" ", $string_to_split);
$size = sizeof($tok);
for ($i = 0; $i < $size; $i++)
$fldname = str_replace($tok[$i], "<font color = red>". $tok[$i] ."</font>", $fldname);
}

Thanks,
Donna
Alex Alexapolsky
Posted: 02/22/2002, 1:03 AM

It's not parameter case sensetivity matters , all you need to do is
form a case insensetive sql statement where both parameter and searchable
field are casted to lower or upper case

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.