Get/POst method to grab info

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
izzysanime

Get/POst method to grab info

Post 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
Kayin
Forum Members
Forum Members
Posts: 59
Joined: Mon Jun 05, 2006 2:33 am

Re: Get/POst method to grab info

Post 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
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm
Location: Finland

Re: Get/POst method to grab info

Post 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>
izzysanime

Re: Get/POst method to grab info

Post by izzysanime »

I found out about that, thanks

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

Josh
izzysanime

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

Post 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
Last edited by izzysanime on Sat Jun 09, 2007 6:17 pm, edited 1 time in total.
izzysanime

Re: Get/POst method to grab info

Post by izzysanime »

OK, i figured it out .  why... sigh



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

thanks
Josh
alby

Re: Get/POst method to grab info

Post 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
izzysanime

Re: Get/POst method to grab info

Post 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
Last edited by izzysanime on Sat Jun 09, 2007 9:48 pm, edited 1 time in total.
alby

Re: Get/POst method to grab info

Post by alby »

izzysanime wrote: the register globals one is on by default anyways
register_globals is off by default from 4.2.0

Alby
Post Reply

Return to “The Lounge”