Jump to content

Archived

This topic is now archived and is closed to further replies.

titangf

Accessing Second Variable Set

Recommended Posts

How do i get to call back the second variable... I have a page currently that isn't recognizing the second variable "display_pict".... any ideas?

[code]
//this is displayed in the url with the two variables that I want
.../property_gallery.php?P_ID=2?display_pict=3.jpg[/code]

This is the way i've been refering to the first variable, but it doesn't want to work for the second one.
[code]$colname_details = $HTTP_GET_VARS['P_ID'];[/code]

I need to be able to keep both of these variables seperate as they are called in different ways.

Thanks in advance. I know i'm overlooking something and I guess I need another set of eyes looking at it to help me out.. lol. thanks again.

Share this post


Link to post
Share on other sites
Found my mistake... it was in the url string...

[code]/property_gallery.php?P_ID=1&display_pict=2.jpg[/code]

Used an "?" instead of "&".... lol


Just needed to take a step back from it all and look at it again.

Share this post


Link to post
Share on other sites
Use & from the second and on, only ? after the page name
[code]
property_gallery.php?P_ID=2&display_pict=3.jpg
[/code]

and $_GET
[code]
$display_pict = $_GET['display_pict'];
[/code]

BUT - it looks like you are doing a direct inclution of whatever the get variable says to include, so [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]display_pict=3.jpg[!--colorc--][/span][!--/colorc--] might be [!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]display_pict=include_bad_script[!--colorc--][/span][!--/colorc--] and make a real fuzz on your server

Just as a note...... if it is so, i would consider doing things a bit different for the security

EDIT: Got me a second earlier there *lol*

Share this post


Link to post
Share on other sites
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Just as a note...... if it is so, i would consider doing things a bit different for the security [/quote]

I am aware of this... but this is information that does not need to be secure. I am not dealing with a shopping cart system so it shouldn't be a major concern. If someone wants to rip off some pictures off my website, I really don't mind.

What would be a reason why I would want to secure the link down if i'm not utilizing a shopping cart system? (other than keeping people from prying)

Share this post


Link to post
Share on other sites
what i mean is that a bad script can easily be included to your server just by including it from the url - and it can do a lot more harm than just ripping off pictures.
Probably a lot of examples, here is one i found just now: [a href=\"http://www.theserverpages.com/10101/21/\" target=\"_blank\"]http://www.theserverpages.com/10101/21/[/a]

Share this post


Link to post
Share on other sites
Thanks for that bit of info....

Didn't know that it was possible to do that outside of someone else's website. Something to consider for the future..

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.