You should really read this article on register_globals before PHP version 4.2
(thats you... 🙂 )
For those of you who like to type in URL's:
http://www.sitepoint.com/article.php/758
OR for those of you who like to click on links:
Click Me
I too had these problems until I got it straight. (variablename is only used here for demo purposes, you need to change it according to your needs.)
Generally you will need to use
$variablename=$GET['variablename'];
or
$variablename=$POST['variablename'];
or
$variablename=$_REQUEST['variablename'];
REQUEST is the best as it handles both POST and GET type methods of passing the variables.
You can also use this if posting variables to the same PHP page itself. (PHPSELF)
$variablename = $_SERVER['SCRIPT_NAME'];
So my PHP page can still access its data, I have had to add two variables in my own script to get it to work...this is just an example of how I did it:
$page = $GET['page'];
$limit = $GET['limit'];
Hope this helps you out...
Drew