title: Unity 5 C# login system - www.data return 1 but it keeps going to else?
body: <p>So I'm trying to make a simple login system in Unity using C#, PHP and MySQL on localhost, but there is a problem. My code works like this:</p>
  
  <p>In the php file, if the <code>username</code> and <code>password</code> matches the ones in the MySQL database, then echo 1. Else echo 0.</p>
  
  <p>In the C# script file in Unity, the problem is in this part of the code:</p>
  
  <pre><code>if (www.error == null) 
      {
          if (www.data == "1") 
          {
              Debug.Log("Successful login/nLoading Scene...");
              StartCoroutine(GoToMenu());
          }
          else
          { 
              Debug.Log("Invalid account or password");
              print(www.url);
              print(www.data);
          }
      }
  </code></pre>
  
  <p>The problem is that my <code>www.data</code> is returning <code>1</code>, but it's skipping the condition <code>www.data == "1"</code> and going to else, where it print it's URL (I checked it, it's correct and functional) and it's data (equal to 1).</p>