How to assign JavaScript variable to PHP session variable?

前端 未结 2 1704
迷失自我
迷失自我 2021-01-27 11:55

Here\'s javascript code that i have

  var randomnum = 30;

and here\'s PHP code



        
2条回答
  •  余生分开走
    2021-01-27 12:25

    Look at the following code. The PHP session is assigned to 30 from the Javascript value. however am not sure if this is good way for implementation.

    
    
    
    
        
        Html Page Title
    
    
    
    
        
    
        document.write(randomnum)';?>
        
    
    
    

提交回复
热议问题