How to pass variables from one php page to another without form?

前端 未结 6 2373
滥情空心
滥情空心 2020-12-13 07:37

I want to know how to pass a variable from one page to another in PHP without any form.

What I want to achieve is this:

  1. The user clicks on a link
6条回答
  •  春和景丽
    2020-12-13 08:09

    use the get method in the url. If you want to pass over a variable called 'phone' as 0001112222:

    click
    

    then on the next page (whatever.php) you can access this var via:

    $_GET['phone']
    

提交回复
热议问题