Question: I'm sending data via Jquery Ajax post, I want to send the text box from my form, but also a variable called username.
For example...

```
$.ajax({type:'POST', url: 'submit.php', data:$('#myform').serialize(), username});

```

How can I do this?

Answer: 
As a good practice, it is better to construct a data object and also include the extra variables. Try constructing a data object and include them ?

```
data = {
    'formData': $('#myform').serialize(),
    'variable': 'username'
}

```
try the query below. username should be a js variable.

```
var username = "myname";

$.ajax({
 type:'POST', 
 url: 'submit.php', 
 data:$('#myform').serialize(), 
 username:username
});

```