flash query string to PHP
- Started
- Last post
- 6 Responses
- mr_flaco
I am converting scripts from asp to php, and for some reason I cant get the php file to recognize variables passed from a loadVariables query string. Im set up similarly to the following:
from flash, I pass '../test.php?user=dave&pwd=12345...
php handling like so:
<?php
$user = $_GET['user'];
$pwd = $_GET['pwd'];ok, so for some reason, its not recognizing it, because if I do a simple
echo $user or die("err=1&message=variable+unde...
I get back '1', and thats it. What is going on? Syntax error?
- unfittoprint0
in any 4.3 or higher version of PHP, the register_globals=off due to security issues. Therefore one of the best ways to parse all of my flash send variables i:
foreach ($HTTP_GET_VARS as $key => $value) {
$$key = $value;
}
- mr_flaco0
So does it treat $HTTP_GET_VARS as an array? Im a little confused.
- unfittoprint0
it's a method to convert every variable you send from flash... [not an example, but the real thing]
then you'll be able to use $user and $pass...
- mr_flaco0
I tried it that way, but for some reason, all I get is '1' back - which doesnt make any sense to me...I dont even know where the 1 is coming from.
- mr_flaco0
ok, I got it. It was an error in my /or die("/
Thanks, and happy holidays.
- JazX0
thank unfit he da' man!