Jump to content

unusual probelm


desithugg

Recommended Posts

okay the problem is sometimes i use the same type of query but it gets the username with a different spelling meaning sometimes all capital sometimes not.So when i check stuff like
[code]
<?
if ($owner != "$me")
{
echo "You do not own this item.";
exit;
}
?>
[/code]
even when the username is same it ives that error is there anyway i can make it non case sensitive
Link to comment
https://forums.phpfreaks.com/topic/17255-unusual-probelm/
Share on other sites

it should be

[code]<?
if ($owner !== "$me")
{
echo "You do not own this item.";
exit;
}
?>
[/code]

But if you want to do both as uncase sencitive you could use strlower ot strupper to make both variables either upper or lower

[code]<?
if (strtolower($owner) !== strtolower($me))
{
echo "You do not own this item.";
exit;
}
?>
[/code]


Regards
Liam
Link to comment
https://forums.phpfreaks.com/topic/17255-unusual-probelm/#findComment-73145
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.