0

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);
1
Contributor
1
Reply
9
Views
4 Years
Discussion Span
Last Post by vizz
-1

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(){

    }); 

});
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.