Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. function DYNAMIC_CHECK(X)
  2. {
  3. $.ajax(
  4. {
  5. url:'<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>',
  6. type:'POST',
  7. data:X,
  8. });
  9. }
  10.  
  11. if(isset($_POST['REGISTER']))
  12. {
  13. $COUNT = mysqli_num_rows(mysqli_query($CON, "SELECT * FROM USER WHERE EMAIL='$EMAIL'"));
  14.  
  15. if($COUNT == 1) { $EMAIL_ERROR='EMAIL ALREADY EXISTS'; }
  16. }
  17.  
  18. echo $EMAIL_ERROR;
  19.  
  20. $.post( "test.php", $( this ).serialize(), function ( data ) {
  21. ...what to do with data (returns the result of test.php)...
  22. });
  23.  
  24. $.ajax(
  25. {
  26. url:'<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>',
  27. type:'POST',
  28. data:X,
  29. success: function(data) {
  30. alert(data);
  31. }
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement