Guest User

Untitled

a guest
Oct 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5. // Selecting Database
  6.  
  7. include_once 'dbh.php';
  8.  
  9. //Here we fetch the data from the URL that was passed from our HTML
  10. form
  11. $userEmail = $_POST['userEmail'];
  12.  
  13. $jobiD = $_POST['jobID'];
  14.  
  15.  
  16. $sql = "UPDATE jobPost SET emailTeacher='$userEmail' WHERE jobID= ('".$jobID."');";
  17.  
  18. mysqli_query($conn, $sql);
  19. ?>
  20.  
  21. function myFunctionjobStatus() {
  22. var jobID = document.getElementById("jobID").value;
  23.  
  24.  
  25. //AJAX code to submit form.
  26. $.ajax({
  27. type: "POST",
  28. url: "http://localhost:8888/EduSubOct/jobstatus.php",
  29. data: { userEmail: localStorage.getItem("email"), 'jobID':
  30. jobID },
  31. cache: false,
  32. success: function(html) {
  33. alert("Request Sent");
  34.  
  35. }
  36. });
  37.  
  38. }
Add Comment
Please, Sign In to add comment