thats likely the problem.
The majority of webhosters do not allow any remote database accesses for security reasons.
You normally put the php on the same web server and use localhost or at least on a webserver within the same LAN and explicitely allow his IP as remote IP.
Check the access logs to make sure your Unity content is properly hitting the URL. Add in a debug log that outputs to a text file and make sure the right information is making it to the PHP file. Log any MySQL errors to text file so you can see what’s not working.
Your issue is very unlikely Unity-related. We do all kinds of WWW-related calls with no issue.
It’s a Bug in Unity in combination with Vista64x ?
I have now sent the datas without Form Array and it work fine.
I have changed the php file for this _POST to _GET and sent directly with URL …php? name=Playername&score=score using WWW(FinalURL) without form.
But sending about Form Arrays WWW(URL,form) doesn’t work. Why ?
Also when I put the strings directly.
Of course you can yield from C#. That while loop will not work though as the engine will never get a chance to service the WWW request.
The syntax for yielding from C# is different though. See: “Coroutines have a different syntax in C#.” in Writing Scripts in C# in the script reference.
I have now convert my code to Javascript.
I have tested the WWWForm with php mail() function and it works fine. But I think, the main problem is, that my database doesn’t accept data informations from _POST. No problems when I use _GET and directly send the datas in URL.
OK Problem solved.
The Problem was using yield in C#. I have now written the code in Java and now it works fine with $_POST and WWWForm. And yield is a must have function for sending the WWWForms. That I knowing now.
Thanks guys!
But how can I use yield with www connection in C# ?
I have don’t understand the yield usage in c# in combination with WWW. The Manual said, I can also use www.isDone but that doesn’t work.
It has a link to my blog, which has the project to download.
It takes a little time to understand the concept of yield, and then a little more to figure out how it works with C#. The class PHPHandler specifically is for doing WWW requests with forms, to PHP / mySQL and callbacks.
Because direct access to databases is a very dangerous thing. Grab the authentication by decompiling with reflector or packet sniffing, your end user now has total control over your database.