Guest User

Untitled

a guest
Dec 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <form method="post" id="height_form" action="#">
  2. <input class="opts_headlines" type="text" id="height_opt" name="length" value="15">
  3. </form>
  4.  
  5. $( document ).ready(function() {
  6. $("#btn_refresh").click(function(){
  7. $.ajax({
  8. url: 'generator/generator.php',
  9. type: "POST",
  10. data: $("#height_form").serialize(),
  11. success: function(data) {
  12. console.log(data);
  13. }
  14. });
  15. return false;
  16. });
  17. });
  18.  
  19. $data = $_POST['length'];
  20. $length =$data;
  21. $log = $length === null;
  22. if ($log) {
  23. $length = 15;
  24. }
  25.  
  26. <?php
  27. $example_checked = isset($_POST['example-checked']);
Add Comment
Please, Sign In to add comment