Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am wondering how I would put information from my website in the URL on the first page of my site, and then on the next page, use $_GET to get the variables from the URL.

I was just wanting to put it in a link like <a href="mywebsite.com/page?name=$name"></a> So would it work if I did it like that, and if it would, how would I get it from the URL?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
305 views
Welcome To Ask or Share your Answers For Others

1 Answer

Example Link: http://example.com/page.php?name=Charles

If you used $_GET["name"] it would return the value Charles

For more information on $_GET look at http://php.net/manual/en/reserved.variables.get.php


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...