Passing javascript variables to php?

后端 未结 5 1709
感情败类
感情败类 2020-12-04 03:31

ok so im trying to get a javascript variable into a php script, this would be an example,



        
5条回答
  •  死守一世寂寞
    2020-12-04 04:08

    So there are 2 pages page1.php and page2.php

    page2.php needs to pass JS variables to page1.php

    We can do this by passing it as url variables from page2.php and get it in page1.php using $_GET[].

    page2.php (send JS variable)

    
    

    page1.php (receive JS variable)

    
    

提交回复
热议问题