Hi Guys,
I was wondering if you might be able to shed some light on a problem that I'm having.
I have a script that allows a user to add a new product category to the database. Before this is done the following element checks whether the category already exists;
$sqlcheckcat="SELECT category FROM categories WHERE category='$name'";
$catnum = mysql_num_rows($sqlcheckcat);
if ($catnum > 0) {$catexist="1"; require "add_col_cat.php";}
else {
$sql="INSERT INTO categories (category) VALUES('$name')";
The problem being that if the query is case sensitive. So if the category 'Computers' already exists and I try to add 'computers' it won't pick it up. Is there a way to make my query non case sensitive?
Thanks in advance for any advice,