url pass question
how can I pass GET url which contains character "?" to php file.
for example I have url:
http://www.mysite.com/file1.php?string=file2.php?a1=1&a2=2&a3=3
I want to pass all string "file2.php?a1=1&a2=2&a3=3" into file1.php
now on file1.php, if I use
$v=$_REQUEST['string'];
echo "$v";
I only get
file2.php?a1=1
it lost rest "a2=2&a3=3"
how can I fix this issue?
Any idea?
michael123
Junior Poster in Training
94 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
$_SERVER['QUERY_STRING']
That's the short answer
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
See all your variable in get request like-
echo '<pre>';
print_r($_get);
echo '</pre>';
This will print the $_get variable.
You can access each var by its name like index of the array for ex.
$p1 = $_get['p1'];
$p2 = $_get['p2'];
network18
Practically a Master Poster
619 posts since Sep 2009
Reputation Points: 29
Solved Threads: 76