I have a project that connects to a php script which connects to a database and stores the users name in the database. When running this project in the unity editor it works perfectly. However when i build it for android and the web player, it doesn’t work. No connection appears to be made to the database.
I have a crossdomain.xml on my server.
Any Help?
I have the solution!
For Android it is important that you add “http://” in WWW.
string post_url = “www.testdomain.de/display.php”;
Not correct:
WWW hs_post = new WWW(post_url);
correct:
WWW hs_post = new WWW(“http://”+post_url);
In my example you must not add the “http://” to the string, because the WWW variable hs_post will cut it.
You have to add it at WWW hs_post.