[eluser]EdgeTube[/eluser]
Hi there,
Quick question; probably doing something wrong that I'm missing.
Here's the code that I have:
Code:
$query = $this->db->query("SELECT username FROM user_table WHERE (username='$name' OR username='$lowercasename')");
if ($row->username = $name)
{
foreach ($query->result() as $row)
{
$profileid = $row->username;
?>
<?="$profileid";?> exists.
<? }} else { ?>
echo "user doesn't exist";
<? }
}
?>
Yeah my indentation is terrible but I'll format that haha.
This is supposed to check the passed data['name'] and check that against the database to see if the user exists, and as you can see above, it echos when a user exists or not.
However, the 'else' part of the function doesn't seem to be working or displaying anything...
Thanks!