Hi, i have a problem with WWW form, when i’m in localhost, the www form work great and connect to my localhost php server, but when i put the php pages in an online php host service (www.altervista.org) an error appers and says: couldn’t connect to host.
Without any code it would be hard for us to know but my first guess would be that the WWW commands are not edited to reflect the new location of the PHP files.
var form = new WWWForm();
form.AddField( “hash”, hash );
form.AddField( “username”, playerNameInput );
form.AddField( “password”, playerPasswordInput );
var w = WWW(URL, form);
yield w;
var URL = "http://wararm.altervista.org/gioco/login.php";
function OnGUI () {
if (GUILayout.Button ("test")) {
ExecWWW ();
}
}
function ExecWWW () {
var form = new WWWForm();
form.AddField("hash", "a");
form.AddField("username", "a");
form.AddField("password", "a");
var w = WWW(URL, form);
yield w;
Debug.Log (w.text);
}
maybe you could show us your php code? of course with the database connection information edited out, but maybe there’s a problem with the way the php code is set up? (I’m not sure if that’s the case with the error you’re getting tho)