PDA

View Full Version : print whatever comi after url



bluemagix
09-16-2008, 11:25 PM
Hello,

i want to print any thing that is coming after url.
ie
i have page xyz.php..
if i call xyz.php?abc
then abc will get print.

how this can be happen

without knowing this is get or post.

please help..

felgall
09-17-2008, 01:21 AM
everything after the ? is loaded to the get variables.

With ?abc you have a field called $_GET['abc'] which exists but doesn't contain any value.

It would be easier if you used ?print=abc because that would mean that you would have $_GET['print'] containing a value of 'abc'.

bluemagix
09-17-2008, 02:49 AM
But what if i am not knowing abt the argumnt name..

xyz.php?ppp=111&qqq=9999

i want values argument name ppp ,qqq also
values 111,9999 also.

i dont know the argument name..

print_R($_REQUEST) gives me the result on browser
it is exactly what i want
but i want to save that output in database..

if i try to store it,
value "1" is getting stored in to the DB.

i try to save it in file then,
" print_r(ARRAY) " get stored..

felgall
09-17-2008, 02:54 AM
Well $_REQUEST is an array of all the get, post, and cookie variables. If you just want the entire query string so you can save it then use:

$_SERVER["QUERY_STRING"]

bluemagix
09-17-2008, 03:01 AM
Thanks falgal..
this is what i want..