Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. passdata = "<passdata><fdata>" +
  2. "<jobtitle>" + jobtitle + "</jobtitle>" +
  3. "<action>" + "add_new_req" + "</action>" +
  4. "</fdata></passdata>";
  5.  
  6.  
  7. $.ajax({
  8. type:"POST",
  9. url:"model_req.php",
  10. data:"data=" + encodeURIComponent(passdata),
  11. success: function(data,textStatus,jqXHR){
  12. if(data.indexOf("ERROR")>=0){
  13. alert(data);
  14. }
  15. },
  16. error: function(jqXHR,textStatus,errorThrown){
  17. alert("some error occured->" + jqXHR.responseJSON);
  18. }
  19. })
  20.  
  21. <form name="inputform" id="inputform" class="form-horizontal col-md-12" method="post"
  22. style="height: 550px; width: 900px" enctype="multipart/form-data">
  23.  
  24. <label class="control-label col-sm-2" for="pwd">Attachment</label>
  25. <input type="hidden" name="MAX_FILE_SIZE" value="2000000">
  26. <div class="col-sm-3">
  27. <input name="userfile" type="file" id="userfile" >
  28. </div>
  29.  
  30. $fileName = $_FILES['userfile']['name'];
  31. $tmpName = $_FILES['userfile']['tmp_name'];
  32. $fileSize = $_FILES['userfile']['size'];
  33. $fileType = $_FILES['userfile']['type'];
  34.  
  35. if(isset[$_FILES['userfile']['name']])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement