Jump to content

Accessing Second Variable Set


titangf

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.
Link to comment
https://forums.phpfreaks.com/topic/7887-accessing-second-variable-set/
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*
[!--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)
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]

Archived

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

×
×
  • Create New...

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.