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?

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

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.