Using ajax to send form data to php

后端 未结 3 783

I want to send form data from ajax to php. My ajax retrieves the form data but it doesnt send it i dont see anything wrong with the code maybe i need a much more professional he

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-22 21:28

    Try this,

    $('#signup').live('click', function(){
    
    $.ajax({
                url:’’,//url to submit
                type: "post",
                dataType : 'json',
                data : {
                    'Susername' : $('#Susername').val(),
                    'Semail' : $('#Semail').val(),
                    'Spassword' : $('#Spassword').val()
                },
                success: function (data)
                {
    
                }
            });
    
    return false;
       });
    

提交回复
热议问题