Page 1 of 1

Get/POst method to grab info

Posted: Sat May 19, 2007 9:55 pm
by izzysanime
Hi,

FOr some reason i cant think of how to get this to work.  I know i have done it before, but ya, ^_^  There is info in the URl (order_id=3000) followed by the rest, is there away to grab a specific part and place that in a form field.  Does that make sense?  I dont usually ask so many questions, ^_^ 

Thanks
Josh

Re: Get/POst method to grab info

Posted: Wed May 30, 2007 5:41 pm
by Kayin
I'm fairly sure we've answered this before.

Code: Select all

<?php echo $_REQUEST['submission_id']; import_request_variables('p', 'p_');
echo $p_submission_id;?>
-K

Re: Get/POst method to grab info

Posted: Wed May 30, 2007 8:43 pm
by tsw
and you probably want to check that the parameter doesnt contain any malicious code also...

tip, try

Code: Select all

<__script__>alert('hi')</__script>

Re: Get/POst method to grab info

Posted: Fri Jun 01, 2007 6:05 pm
by izzysanime
I found out about that, thanks

And thanks for the double check with malicious code, I almost forgot about that part.

Josh

Re: Get/POst method to grab info (new update)

Posted: Sat Jun 09, 2007 1:03 am
by izzysanime
Hi, Im having an issue with this now that I have switched the php file to a different server.  When it was on mine, it worked just fine, but on the new server, nothing works, it wont display at all. 
and post as well

I have also done this:
"); ?>

still nothing. I have modified the php.ini file with this:
track_vars = on
register_globals = on

so, any input would be awesome. (o by the way, its on 1and1)

thanks
Josh

Re: Get/POst method to grab info

Posted: Sat Jun 09, 2007 6:42 pm
by izzysanime
OK, i figured it out .  why... sigh



why does this work and not the other?  its soo annoying.

thanks
Josh

Re: Get/POst method to grab info

Posted: Sat Jun 09, 2007 8:07 pm
by alby
izzysanime wrote:

why does this work and not the other?  its soo annoying.
Is submission_id the REAL variable?
Check with:


izzysanime wrote: I have modified the php.ini file with this:
track_vars = on
register_globals = on
Very bad idea ...  :(

Alby

Re: Get/POst method to grab info

Posted: Sat Jun 09, 2007 9:46 pm
by izzysanime
submission_id is the real variable, yes

As for the php.ini file, which ones are a bad idea? the register globals one is on by default anyways

Re: Get/POst method to grab info

Posted: Sat Jun 09, 2007 10:24 pm
by alby
izzysanime wrote: the register globals one is on by default anyways
register_globals is off by default from 4.2.0

Alby