/    Sign up×
Community /Pin to ProfileBookmark

When clicking a link, it goes to that link ,plus making a variable equal to something

I have 2 pages(page-1 and page-2) that have the same link to go this one page (lets say page-3). There are two ways to page-3 because those 2 pages carry different variable. Page-1 brings $num = 1, and page-2 brings $num = 2. Then, page-3 will use those values to do certain things. How to bring those values exactly? because Url is just an address, and theres no way to bring any value in it.

there’s a picture if you don’t see my situation. tq

[ATTACH]17517[/ATTACH]

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumJun 15.2017 — because Url is just an address, and theres no way to bring any value in it. [/QUOTE]That's not true:

https://en.wikipedia.org/wiki/Query_string
Copy linkTweet thisAlerts:
@NogDogJun 15.2017 — You can use "example.com/somepage?page=1", and page will be available however the programming language/framework you use stores GET key/value pairs. For example, in PHP, [FONT=Courier New]$_GET['page'][/FONT] would equal 1 in this case.

There are techniques that can make "prettier" URLs, such that it might look like "example.com/somepage/1", and the web server and/or application settings would be used to send that to the "sompage" script with the page value of 1.
Copy linkTweet thisAlerts:
@henryreviews123Jun 16.2017 — You can use "example.com/somepage?page=1", and page will be available however the programming language/framework you use stores GET key/value pairs. For example, in PHP, [FONT=Courier New]$_GET['page'][/FONT] would equal 1 in this case. There are techniques that can make "prettier" URLs, such that it might look like "example.com/somepage/1", and the web server and/or application settings would be used to send that to the "sompage" script with the page value of 1.[/QUOTE] Nothing more to say, UP
×

Success!

Help @syazanizul spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...