Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="inserting">
- <button id="inserting_btn">Upload</button>
- <input type="file" id="inserting_file"/>
- </div>
- $('#inserting_btn').click(function(){
- var file = $('#inserting_file').val();
- $.ajax({
- method: 'POST',
- url: 'input_text/import.php',
- data: 'file='+file,
- success: function(data){
- alert(data);
- }
- });
- });
- if ($_FILES['file']['tmp_name'] ){
- echo 'yes';
- }
- else {
- echo 'no';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement