jQuery post data return comparison not working
<p>I have this bit of code:</p>

<pre><code>function addEmail() {
            email = $("#email").val();
            atime = $("select#time").val();
            tid = &lt;?= $tid; ?&gt;;
            $.post("remindme.php", { email: email, time: atime, tid: tid },
                function(data) {
                    if (data == "x") {
                        alert(data);
                        $('#remindme').modal('hide');
                        $('#quota').show();
                    }
                    else {
                        alert(data);
                        $('#remindme').modal('hide');
                        $('#remindersuccess').show();
                    }
                });
            }
</code></pre>

<p><code>remindme.php</code> echo's "x" if something is wrong.</p>

<p>I'm trying to compare the output from remindme.php but even though it echo's the x, the condition <code>data == "x"</code> does not work.</p>

<p>I added <code>alert(data)</code> and I can see it properly displaying the <code>x</code> when needed..</p>
