How to upload file and form data using jQuery?

<input type="text" name="Name" id="name" />
<input type="text" name="Email" id="email" />
<input type="file" name="attachment"  id="attachment" accept="application/msword/pdf"  />

$target = "uploads/"; 
$target = $target . basename( $_FILES['attachment']['name']) ; 
move_uploaded_file($_FILES['attachment']['tmp_name'], $target);

Ineed Help for this

<form method="post" enctype="multipart/form-data"  >
    <input type="text" name="Name" id="name" /> 
    <input type="file" name="file" id="file" />  
    <input type="submit" name="submit" id="submit" />
</form>

$(document).ready(function(){

    $("#submit").click(function(){

    }); 

});
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.