how to submit a form without a submit button?

Is there any way to submit a form without clicking a submit button ?

Team Leader Asked on October 13, 2017 in PHP.
Add Comment
1 Answer(s)
     
    <input type="hidden" id="uname" value=""> 
    <input type="hidden" id="email" value="">
     <script type="text/javascript">
    $(document).ready(function() {
    var uname=$("#uname").val();
    var email=$("#email").val(); 
          jQuery.ajax({   
                url: "domian.com/result.php", 
                                          data: { uname: uname, email: email },       
            dataType: "json",         
                          success:function(data){       
                console.log (data);         
                        },                error:function (){}            });});     
                  </script>
    
    Team Leader Answered on November 16, 2017.
    Add Comment

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.