Jump to content

[SOLVED] How to echo variable on url's that are not top level


kiowa_jackson

Recommended Posts

I have made two pages with

 

<?php echo $tid; ?>

 

on them, and uploaded them. One is at the top level and works, the other is in a folder and does not work.

 

http://www.believeandmanifest.com/echo.php?tid=works

 

http://www.believeandmanifest.com/1/echo.php?tid=doesnotwork

 

Can someone tell me why this is?

 

THanks

Neither should work, but it has nothing to do with what directory your files are in.

 

 

that's weird,

 

http://www.believeandmanifest.com/echo.php?tid=works

 

has exactly that line of code of it, and I used that on several other pages and it works...is the page displaying the value on the page in the h1 tag?

 

Thanks for that though, that fixed it.

It's to do with an option called "register_globals"

 

For whatever reason, register_globals is on in your top directory but off in the other directory.  As a result, $tid works in the top one, but the full form $_GET['tid'] must be used in the other one.

It's to do with an option called "register_globals"

 

For whatever reason, register_globals is on in your top directory but off in the other directory.  As a result, $tid works in the top one, but the full form $_GET['tid'] must be used in the other one.

 

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.