What to parameter value from returning url in php [duplicate] - php

This question already has answers here:
GET URL parameter in PHP
(7 answers)
Closed 7 years ago.
I have a client url[www.mysite.com/page.aspx]
when we put this url in browser then it revert the automatically
with this url
[www.mysite.com/page.aspx?|&CC=121&DD=123&AA=323|&CC=321&DD=555&AA=000]
Now we want to fetch that parameter value in php page through php or jquery.
Kindly Help and give the best suggestions.

You can simply use GET
$cc = $_GET['CC'];
$dd = $_GET['DD'];

You can access those values using $_REQUEST or $_GET

Related

How to extract path url using PHP [duplicate]

This question already has answers here:
PHP Parse URL From Current URL
(6 answers)
Closed 3 years ago.
How can I extract path in url using php ?
example :
text input = https://drive.google.com/open?id=1OJOZBBUCa5SsmUF3UdGJCk7A4t2kAHVr
output = 1OJOZBBUCa5SsmUF3UdGJCk7A4t2kAHVr
You can use $_GET['id'].
Or $_SERVER['QUERY_STRING'] to get all the parameters.

How get input from url html and use it on href variable [duplicate]

This question already has answers here:
How can I get parameters from a URL string?
(12 answers)
Closed 6 years ago.
i have a page in HTML which get in input an "id" variable by URL:
registration.html?id=123456789
Now i want use this "id" variable into an href variable inside registration.html file to write the "id" input parameter of php file described on href
Can I get some help?
Thanks
Firstly, it will need to be a .PHP file for any PHP code to execute.
Despite that, you're going to want to output $_GET['id']

How can I get URL (with some parameters)? [duplicate]

This question already has answers here:
Get URL query string parameters
(11 answers)
Closed 6 years ago.
I have a form on page, with url like this:
site.com/form.index.html?ref=https://login....
And I get page URL via this code:
http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]
But as result I get not full URL, just this:
site.com/form.index.html
How can I get full URL?
You want to add the query string:
$url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]$_SERVER[QUERY_STRING]";
Additionally, you may replace the http bit with $_SERVER[REQUEST_SCHEME]:
"$_SERVER[REQUEST_SCHEME]://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]$_SERVER[QUERY_STRING]"

How to get a URL query next to the "#!" prefix? [duplicate]

This question already has answers here:
Get fragment (value after hash '#') from a URL [closed]
(10 answers)
Closed 7 years ago.
I'm trying to get the URL query next the "#!" prefix, for example:
https://mega.co.nz/#!123abc
<?php
$query=$_GET["#!"]; //the example
?>
$query: 123abc.
It is possible to read the query using PHP or .htaccess file? How i can get started?
Thanks for reading and for any help! :)
Try this,
Let your URL:
https://mega.co.nz?query=123abc
Then you can get value as below :
<?php
$query=$_GET["query"]; //the example
?>

How to pass # in url params? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
# in url getting ignored in php 5.2
I have following link on webpage. Here I am sending return(/profile?id=6#contacts) as url param to return back after operation complete. But it is sending only /profile?id=6 to verify.php script.
http://example.com/verify.php?id=1&sessionId=6&return=/profile.php?id=6#contacts
I know that hash value is not passed to server but I want to know that is there any way to pass compelete return param to server with # value.
Thanks
You need to urlencode() the entire return parameter.

Categories