...

View Full Version : Resolved case sensitivity



harkly
07-27-2012, 05:06 PM
SCRATCH THIS

I figured out what my issue was, all started with the login page, now that I've fixed that this issue is moot.




I have this code which seem to be case sensitive but I do not want it to be. However I cannot figure out why it is can
someone help?


Say a userName is 'junk' and they log in as 'JUNK' then the code below does not see that 'junk' == 'JUNK'



$sql2 = "SELECT * FROM nudges WHERE sender='$clientID' AND receiver ='$userID' UNION SELECT * FROM nudges WHERE sender='$userID' AND receiver ='$clientID'";
$result2 = $mysqli->query($sql2);
$num_rows = $result2->num_rows;

while ($r=$result2->fetch_assoc()) {
$sender=$r["sender"];
}

if($num_rows == 1){
echo "<span class='links'><img src='img/group_go2.png'> </span>
<div id='linkboxUserIDNudged'>";
if ($clientID != $sender){
echo "<a href='myNudges.php'>Nudged</a></div> ";
}
else {
echo "<a href='sentNudges.php'>Nudged</a></div> ";
}
}


However this statement doesn't seem to make that comparison



$sql ="SELECT * FROM threads WHERE receiver='$clientID' OR ( sender='$clientID' AND replies >=1 ) ORDER BY lastDate DESC";
$result = $mysqli->query($sql);
while($r = $result->fetch_assoc()) {
$sender=$r['sender'];
$receiver=$r['receiver'];
$replies=$r['replies'];

if($clientID == $sender){



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum