url pass question

Reply

Join Date: Jun 2005
Posts: 92
Reputation: michael123 is an unknown quantity at this point 
Solved Threads: 0
michael123 michael123 is offline Offline
Junior Poster in Training

url pass question

 
0
  #1
Nov 16th, 2007
how can I pass GET url which contains character "?" to php file.
for example I have url:
http://www.mysite.com/file1.php?stri...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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,405
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 225
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: url pass question

 
0
  #2
Nov 16th, 2007
  1. $_SERVER['QUERY_STRING']
That's the short answer
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 549
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 64
network18 network18 is offline Offline
Posting Pro
 
0
  #3
Oct 9th, 2009
See all your variable in get request like-
  1. echo '<pre>';
  2. print_r($_get);
  3. 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'];
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC