I have a game created in ActionScript 3 which uses a MySql database / PHP to store and reload the game state between player logins. I have strings(varchars), ints, big ints etc being saved. On my local WAMP server this seems to work perfectly. On upload however, my host database will not store the strings. It will store strings used for the login / registration (username, email etc) but not the strings created for some of the game data ( a game character's color, gender, hair style, shoes etc are stored as one long string). I have a php file which deals with login and registration and a second dealing with all game store / load, plus a number of AS3 interface classes which talk to this php file. But the same AS3 class / php file will successfully store ints etc whilst failing to store string data. I checked the column names and that the local and host databases are identical, and have set the collation to utf8_bin for all the string fields in case there was some sort of collation issue. I am new on databases...
In the php I am using something like:
$id=$_POST['userId'];
$value1=$_POST['array1'];
$value2=$_POST['array2'];
$what=$_POST['action'];
if ($what === 'storeStuff'){
mysqli_query($db,"UPDATE mytableName SET field1=$value1, field2=$value2 WHERE userid='$id'") or exit("systemResult=fail");
exit("systemResult=success");
}
Here is an example of the type of string info being saved successfully in my local database table, but which gives me a 'systemResult = fail' on my hosted database:
0,1,0|0,0,3|0,1,0|0,1,1
Any ideas what is going on? Thank you.