Xyphon Posted February 1, 2011 Share Posted February 1, 2011 Sorry if this isn't the right forum, I wasn't sure where to post this. Alright, so I have a high score submit script, and it goes as follows... This is the actionscript: on (release) { var uscore:LoadVars = new LoadVars(); uscore.name = _root.suname; uscore.score = _root.suscore.stime; uscore.game = "alien"; uscore.mode = "survival"; uscore.sendAndLoad("linkhere", uscore, "POST"); play(); } Note: We have also tried: on (release) { var uscore:LoadVars = new LoadVars(); uscore.name = _root.suname; uscore.score = _root.suscore.stime; uscore.game = "alien"; uscore.mode = "survival"; var uscoresubmit:LoadVars = new LoadVars(); uscore.sendAndLoad("linkhere", uscoresubmit, "POST"); play(); } The PHP is: <?PHP include('Connect.php'); $name=$_POST['name']; $name=mysql_real_escape_string($name); $score=$_POST['score']; $score=mysql_real_escape_string($score); $game=$_POST['game']; $game=mysql_real_escape_string($game); $mode=$_POST['mode']; $mode=mysql_real_escape_string($mode); if(!empty($game)) { mysql_query("INSERT INTO scores(game, name, score, mode) VALUES ('$game', '$name', '$score', '$mode')"); } ?> I have also tried running a number of things on the "else" of that if(!empty($game)) and nothing has pulled through, so I'm under the notion that it isn't loading the page in sendAndLoad()? It was working before, but it appears to have just stopped, we're not sure what we changed. Any help would be greatly appreciated! Thanks, Xyphon Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/ Share on other sites More sharing options...
Xyphon Posted February 1, 2011 Author Share Posted February 1, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1168330 Share on other sites More sharing options...
Xyphon Posted February 2, 2011 Author Share Posted February 2, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1168629 Share on other sites More sharing options...
BlueSkyIS Posted February 2, 2011 Share Posted February 2, 2011 build a basic form in HTML to post those values to the PHP script to see if the PHP works. Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1168655 Share on other sites More sharing options...
Xyphon Posted February 3, 2011 Author Share Posted February 3, 2011 The PHP is most definitely working, I've tried just running the script without the variables and it works, so if the variables were null it should still create an empty table. It seems to not be loading in the "sendandLoad", although I'm not positive that this is the problem. It has worked twice before, we have made minor changes since but nothing that should disable it from working properly. Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1169195 Share on other sites More sharing options...
Xyphon Posted February 3, 2011 Author Share Posted February 3, 2011 I'm pretty sure it's the as2 now, because I changed the as2 so that it would check if it successfully sent the vars. The first time we tried it, it successfully sent it, and then after that it never worked again. I guess this is an as2 question now, so it really doesn't belong in this forum, unless it really is the PHPs fault, which I doubt. Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1169474 Share on other sites More sharing options...
Xyphon Posted February 4, 2011 Author Share Posted February 4, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1169919 Share on other sites More sharing options...
BlueSkyIS Posted February 4, 2011 Share Posted February 4, 2011 I guess this is an as2 question now, so it really doesn't belong in this forum Quote Link to comment https://forums.phpfreaks.com/topic/226310-transfer-vars-from-flashas2-to-php/#findComment-1169925 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.