Hello, I have been trying to code a login script. My problem is, it appears that my w.text is always empty when it returns to unity. Below I have linked to my codes. What am I doing wrong? Everything seems right but nothing is getting returned to unity from the php file. Am I not supposed to use echo? Should I use return?
You are doing it all correctly execpt one thing, there is a no function in PHP that will be called automatically. Your main function has to be called somewhere inside that php script. probally like
<?php
function main($formUse = true){.....}
// calling the main funciton here
main(true);
// Close mySQL Connection
mysql_close();
?>
other than that everything looks fine. Or you can remove the whole function setup and jus write the statements inside that function outside. Both the ways it would work