syrkel Posted August 20, 2006 Share Posted August 20, 2006 I am trying to have a Multiplayer Engine through PHP but I need it to read and store multiple variables... So what I am doing is I am sending variables from Flash like so:[code]for (var d = 0; d<_root.whosonlinearray.length; d++) { _root.multiplayer_send_lv["loginID"+d] = _root.whosonlinearray[d];}[/code]And now in PHP I want it to read $loginID1, $loginID2, and so on. But I have tried such things as:[code]$t = 0;$loginID = eval("\$loginID$t");$t++;[/code][code]$t = 0;$loginID = $("loginID" . $t);$t++;[/code][code]$t = 0;$loginID =& "\$loginID$t";$t++;[/code][code]$t = 0;$loginID = "\$loginID$t";$loginID =& eval($loginID);$t++;[/code]But my command that it's referencing still won't work:[code]if ($row['loginID'] == $loginID) {[/code]or[code]if ($row['loginID'] == eval("\$loginID$t")) {[/code]Or anything of such...Can anyone help with this? Quote Link to comment Share on other sites More sharing options...
syrkel Posted August 23, 2006 Author Share Posted August 23, 2006 *Waits in suspense for a response* Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 23, 2006 Share Posted August 23, 2006 Depending on the method of sending the data, GET or POST, you can use:[code]$loginID = $_GET['loginID' . $n];or$lognID = $_POST['loginID' . $n];[/code]Where $n is an int. Quote Link to comment Share on other sites More sharing options...
syrkel Posted August 24, 2006 Author Share Posted August 24, 2006 Thanks very much ^_^ Quote Link to comment Share on other sites More sharing options...
syrkel Posted September 23, 2006 Author Share Posted September 23, 2006 I can also use $$variable.More here:http://ca.php.net/manual/en/language.variables.variable.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.