I am using the jQuery post method to create a record in MySQL. When I evaluate the output of the PHP with `==`, all three conditionals work properly. However, when I use `===`, the first two conditionals return `false`. How do I pass the correct data type to Javascript from PHP?

jQuery:

```
$("#form").validate({

    submitHandler: function(form) {
        // do other stuff for a valid form
        $.post('inc/process_form.php', $("#form").serialize(), function(data) {
            //alert(data);
            if (data == 1) {
                $('#results').html("Success");
            } else if (data == 2) {
                $('#results').html("No Success");
            } else {
                $('#results').html(data);
            }
        });
    }
});

```

This is the PHP (which I've truncated to only show the execute conditional):

```
$value = $stmt->execute();

if ($value === TRUE) {
echo 1; //success
} else {
echo 2; //failure
}

```