View Full Version : Resolved case sensitivity

07-27-2012, 06:06 PM

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()) {

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()) {

if($clientID == $sender){