PHP _GET() function not working |
|
You need to use $_GET['dataname'].
|
||||||||||||
|
|
sorry, typo, I have tried $_GET[dataname], $_GET["dataname"], and $_GET['dataname'].
|
||||||||||||
|
|
$_GET["dataname"] and $_GET['dataname'] are the same, they just use different type of quotes. However they should both work. I can think of only a few situations, when the variable would be empty.
1) You unset the variable using unset($_GET['dataname']) earlier in the script or overwrite it with NULL value (or empty string, etc.) 2) You have register_globals = on (PHP setting) and a) you overwrite it by $dataname variable earlier in the script b) it is overwritten by other variable from $_POST, or $_COOKIE 3) You have an internal redirection in your .htaccess file that strips the parameters 4) You have an the same redirection as in 3) but directly in .htconf of you Apache server or IIS equivalent of this I can think of no other situation (save corrupted PHP) how this could happen otherwise. If possible I suggest you to use echo ini_get('register_globals') to check 2) and see if they are on. Then I would suggest to use var_dump($_GET) to see if your 'dataname' exists, is empty string, NULL, or otherwise. If it exists but is empty, it means it has been overwritten by empty value (NULL). If it does not exist, it means that it ether has been unset or it has never been registered, which would point me to 3) or 4). Together with this and verification of your code before using the variable you should be able to pinpoint the problem. |
||||||||||||
|
|
what URL do you use for the window? Are you aware of current URL (document location) the script is running on?
Just put alert with URL location you're trying to open Smile Most probably URL is wrong and therefore won't open. _________________________________________ |
||||||||||||
|
PHP _GET() function not working |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by