Submit form without page reloading

后端 未结 17 2482
无人及你
无人及你 2020-11-22 00:45

I have a classifieds website, and on the page where ads are showed, I am creating a \"Send a tip to a friend\" form...

So anybody who wants can send a tip of the ad

17条回答
  •  情话喂你
    2020-11-22 01:12

    Submitting Form Without Reloading The Page And Get Result Of Submitted Data In The Same Page

    Here's some of the code I found on the internet that solves this problem :

    1.) IFRAME

    When the form is submitted, The action will be executed and target the specific iframe to reload.

    index.php

    
    

    iframe_content.php

    
    

    2.) AJAX

    Index.php:

       
        
        

    server_action.php

    
    

    Tags: phpajaxjqueryserversidehtml

提交回复
热议问题