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
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*
Link to comment
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)
Link to comment
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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.