PHP Script argument passing error...
Hi,
Currently, I have httpd 2.0.40 running with the imap, perl, ssl, mysql, ldap modules installed. Here's my problem: I can't pass arguments to my php scripts... Imagine I had a script named test.php containing: <?php echo"$y" ?> When I try to pass argument y from the browser(test.php?y=gsd) nothing gets printed! Is this a normal behavior? I mean that this isn't supported on my version or that I need a special module or something... Thanks in Advance, Best regards, |
look at php.ini and change this line:
"register_globals = Off" to "register_globals = On" but that can be bad idea... for multi-reasons, so do not set it "On" and if you want get variables from url you must write (as your example): PHP Code:
there more as $_SESSION, $_REQUEST, $_ENV, $_FILES and $GLOBALS... just check http://php.net/variables |
Thanks it works fine now!
In php.ini it says that it's insecure... But every Webpage provider I know has this feature on. Is it really inscure, if so, Why? |
This is stupid example but can explain,
PHP Code:
|
Newbie thought: Have vital things like login as local/private/non-global variables.
|
I tought of a similar thing at first but that won't work since $stored_password won't be equal to $_GET['y'], thus login will be set to false in all cases.
|
All times are GMT -5. The time now is 10:01 AM. |