PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
One of my client's migrated the site we built for them to a Linux box (they are hosting their own site in-house). After the move (they would have set up LAMP) our GET variables are not being seen. I've ssh'd onto the server and looked at their php.ini file. Register_globals is set to 'off'. I've created two pages to test the theory. They won't run on the client's server but will run on my 'nix box
<html>
<head>
<title>What's wrong with the Get variables?</title>
<body>
click <a href="test_out.php?message=<? echo "Hello"; ?>">here</a> to send message!
</body>
</html>
<html><head><title>did it work?</title></head>
<body>
the message today is, <?print $_GETї'message'];?>
</body>
</html>
If the 'short_open_tag' directive is set to 'On' then you should have no need to switch to the long opening tag. Having said that, I always use the longer opening tag as I consider it to be more protable than using the short open tag.
Can you tell me, in your first example (test_in.php) is the 'message' variable being set with 'Hello' when you view the link properties? or is it just the GET variables that are not being picked up by the 'test_out.php' script?
I always use the longer opening tag as I consider it to be more protable than using the short open tag
I think I'll move over to that idea anyway for future reference
is the 'message' variable being set with 'Hello'
Yes. I can see it in the status bar when I hover over the link and it remains in the address bar when I'm on the receiving page. To confirm, it is the GET variables which are not working (i.e. the variable is definitely going over to the receiving page).