Inserting into MySQL from PHP (jQuery/AJAX)

后端 未结 2 569
野趣味
野趣味 2020-11-29 05:32

I have seen many tutorials, but they\'re so confusing, and to do what I want to do, I just don\'t get how to use existing stuff from those tutorials and make them work they

2条回答
  •  感动是毒
    2020-11-29 06:07

    Hi here is just a quick example of how one might do it:

    The HTML:

    
    
        
            Quick JQuery Ajax Request
            
    
            
            
            
    
        
        
    
            
    Value:

    The process.php script:

    success = false;
    if($result) {
        $resp->success = true;
    }
    
    print json_encode($resp);
    ?>
    

    Please note that none of this has been tested. I hope it helps you thou.

提交回复
热议问题