How to send two inputs with jQuery
<p>ok, i have these two input fields where a user puts in two twitter names. When the submit button is pressed, both names should be send to a .php file with the POST method that checks if both usernames exsist on twitter.</p>

<p>Sending and receiving the answer for one value already works, but how can i also add the second? I already have this:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function checkUsername()
{

    $.ajax({
        type: 'POST',
        url: 'tu.php',
        **data: {'user1' : $('#user1').val() },** //how to append user2?
        dataType: "json",
        success: function(data){
            $('#uitslag').html(JSON.stringify(data)); 
            $('#user1text').html(data['user1']);
            $('#user2text').html(data['user2']);
        }
    });
}
&lt;/script&gt;
</code></pre>

<p>the fields in the form:</p>

<pre><code>    &lt;td&gt;&lt;input type="text" name="user1" id="user1"/&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input type="text" name="user2" id="user2" /&gt;&lt;/td&gt;
</code></pre>

<p>and this is how the values should be able to be cathed in the .php:</p>

<pre><code>$user1 = $_POST['user1'];
$user2 = $_POST['user2'];
</code></pre>

<p>So the question really is: how can I append the second username to the above jQuery POST function?</p>

<p>p.s. I am starting with javascript and jQuery, how do you guys work with this as no error messages are shown ever.. is there an environment/programm where I get debugging help with javascript?</p>
