Jump to content

[SOLVED] Problem $_GETTING variables from URL


Adeus

Recommended Posts

Hello, I've encountered an error using the following method to grab a variable from the URL:

 

The actual URL is something like: http://www.something.com/list.php?item=xxx&e=686

 

My code to grab the variable $e is as follows;

if (isset($_POST['e'])) {
   $_POST['e'] = $e;
   }

 

Further down the page I use the variable in;

echo " <iframe src=\"http://www.othersite.com/items.cfm?client=xxxx&e=$e\"></iframe>";

 

When I view the source, it does not carry the $e variable down to the iframe link (it just appends "&e=" to the end). I have uploaded this to two testing servers. It works on PHP 4.3.11, but not PHP 4.4. Is there an option in the configuration that would cause this error? Or have I made a rookie mistake somewhere?

Link to comment
Share on other sites

Thanks for your quick replies. Unfortunately, it is still not working.

 

I even made a test page with the following code in the <body>;

 

<?php

$_GET['e'] = $e;

echo "Your variable is $e";

?>

 

When I follow http://www.something.com/test.php?e=686, it does not display the variable (of course, it just says "Your variable is"). This leads me to believe something is screwey in the configuration. Is there something to toggle to disable $_GET functionality?

 

Thanks

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.