I\'m trying to create a form that allows a user to fill out data and if an option is checked a div opens up and the user has the option to upload a file along with their sub
There are two ways to do it, one is pass parameters if you have less variables in you form..
$post('url',{param1:$("#name").val(),param2:$("#middle").val()},function(data){
//Action as per data returned from php code
});
Another method is serialize() method.
$post('url',{param1:$("form").serialize()},function(data){
//Action as per data returned from php code
});