Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.register').on('submit', function(e) {
- console.log('making user...');
- e.preventDefault();
- $.ajax({
- url: '/cs/new_user.php',
- type: 'POST',
- contentType: 'application/json',
- dataType: 'json',
- data: {
- user: $('.user').val(),
- pass: $('.pass').val(),
- email: $('.email').val()
- },
- success: function(msg) {
- console.log(msg.toString());
- if (!msg.sucess)
- $('.msg').text(msg.msg);
- },
- error: function(xhr, status, err) {
- console.log(xhr.responseText);
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement