Guest User

Untitled

a guest
Aug 16th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <script
  2.  
  3. src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/core.js">
  4. </script>
  5. <script type="text/javascript">
  6. function clickButton(){
  7. var phone=document.getElementById('phone').value;
  8. var id=document.getElementById('id').value;
  9. $.ajax({
  10. type:"post",
  11. url:"userDetaiAjax.php",
  12. data:
  13. {
  14. 'phone' :phone,
  15. 'id' :id
  16. },
  17. cache:false,
  18. success: function (html)
  19. {
  20. alert('Data Send');
  21. $('#msg').html(html);
  22. }
  23. });
  24. return false;
  25. }
  26.  
  27.  
  28.  
  29. </script>
  30. <div class="col">
  31. <div class="form-group">
  32. <h6><label>Name :</label> <?php echo $name ?></h6>
  33. <h6><label>Email :</label> <?php echo $email ?></h6>
  34. <input type="" name="phone" id="phone">
  35. <input type="" name="id" id="id" value="<?php echo $_SESSION["staff_id"];?>" hidden>
  36. <h6><label>Phone :</label> <?php echo $phone ?></h6>
  37.  
  38. <input type="submit" name="aa" value="submit2" onclick="return clickButton();">
  39.  
  40. </form>
  41. <p id="msg"></p>
  42.  
  43.  
  44.  
  45. </div>
  46. </div>
  47. </div>
  48. </div>
Add Comment
Please, Sign In to add comment