M
M
Mark Adams2016-05-26 18:08:51
PHP
Mark Adams, 2016-05-26 18:08:51

How to extract data from a link?

You need to get the id parameter from the link: www.domen.ru/test.php#id=123
I know how this is done if GET, but how to be here?
I found only this: parse_url , but it's not clear how to pass a link to it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mark Adams, 2016-05-28
@ilyakmet

javascript.ru/window-location

A
Alexander Aksentiev, 2016-05-26
@Sanasol

explode + parse_str
ps.
If getting from the link means getting the hash of the current open page, then this is not PHP.

A
Alexey, 2016-05-26
@alsopub

Is there any information after '#' in $_SERVER{'REQUEST_URI'}?
Or where are you getting this link from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question