How to pass a PHP variable using the URL

后端 未结 6 514
暖寄归人
暖寄归人 2020-11-30 04:20

I want to pass some PHP variables using the URL.

I tried the following code:

link.php





        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 04:47

    I found this solution in "Super useful bits of PHP, Form and JavaScript code" at Skytopia.

    Inside "page1.php" or "page1.html":

    // Send the variables myNumber=1 and myFruit="orange" to the new PHP page...
    Send variables via URL! 
    
        //or as I needed it.
        Send variables
    

    Inside "page2c.php":

    
    

提交回复
热议问题