Quote from llazzari on December 8, 2020, 9:15 pmBUONGIORNO A YTUTTI
HO CREATO UN'APP PER ANDROID
CHE CONTIENE UN FORM PER INVIARE DATI AD UN DATABASE MYSQL.
AVVIANDO L'APP DA VISUALNEO O DA CHROME I DATI
ARRIVANO AL SERVER E VENGONO INSERITI NELLE TABELLE.INSTALLANDO L'APP SU TELEFONO CELLULARE O COME PWA, HO PROVATO DIVERSI MODI
MA I DATI NON ARRIVANO AL SERVER DAL TELEFONO CELLULARE.
SE QUALCUNO PU AIUTARMITHIS IS THE ONLY ERROR THAT MAKES THE DEBUG
[$rootScope:inprog] http://errors.angularjs.org/1.7.7/$rootScope/inprog?p0=$digest (angular.min.js, 146)
BUONGIORNO A YTUTTI
HO CREATO UN'APP PER ANDROID
CHE CONTIENE UN FORM PER INVIARE DATI AD UN DATABASE MYSQL.
AVVIANDO L'APP DA VISUALNEO O DA CHROME I DATI
ARRIVANO AL SERVER E VENGONO INSERITI NELLE TABELLE.
INSTALLANDO L'APP SU TELEFONO CELLULARE O COME PWA, HO PROVATO DIVERSI MODI
MA I DATI NON ARRIVANO AL SERVER DAL TELEFONO CELLULARE.
SE QUALCUNO PU AIUTARMI
THIS IS THE ONLY ERROR THAT MAKES THE DEBUG
[$rootScope:inprog] http://errors.angularjs.org/1.7.7/$rootScope/inprog?p0=$digest (angular.min.js, 146)

Quote from luishp on December 9, 2020, 4:36 pmHi @llazzari, if you are deplying your app in a different server than your database please be sure to follow this steps:
- Add at the very top of config.php file this code (to avoid CORS):
header("Access-Control-Allow-Origin: *");
- Upload to your server neofuncions.php and config.php files (and, of course, the database).
- You should also tell neophp plugin where neofunctions.php file is located (under Project > Events). Sample:
neoPhpSetPath "https://visualneo.com/tutorials/neoPhpDb1/neofunctions.php"Done! :)
If you still have CORS problems use a proxy:
neoPhpSetPath "https://cors-anywhere.herokuapp.com/https://visualneo.com/tutorials/neoPhpDb1/neofunctions.php"I have tested it and works fine from my server using the sample database:
neoPhpExecSql "db1" "loadTable" "" "parseData"
Regards.
Hi @llazzari, if you are deplying your app in a different server than your database please be sure to follow this steps:
header("Access-Control-Allow-Origin: *");
neoPhpSetPath "https://visualneo.com/tutorials/neoPhpDb1/neofunctions.php"
Done! :)
If you still have CORS problems use a proxy:
I have tested it and works fine from my server using the sample database:
neoPhpExecSql "db1" "loadTable" "" "parseData"
Regards.
Quote from llazzari on December 9, 2020, 11:01 pmHi luishp thanks for the information you gave me, I will take it into account.
I did not explain myself,On the server I uploaded this php file for inserting data into the database table always created on the server.
The code of the form / form of the APP is in the section SEND / SUCCESS / FAILED ONLY THISFrom mobile the data sent to the form does not reach the server.
from Chrome instead they come<?php //RECUPERO VALORI PASSATI DAL FORM $data = $_POST['DATA']; $ora = $_POST['ORA']; $luogo = $_POST['LUOGO']; $ente = $_POST['ENTE']; $cognome= $_POST['COGNOME']; $nome= $_POST['NOME']; $grado= $_POST['GRADO']; $matricola= $_POST['MATRICOLA']; $targa= $_POST['TARGA']; $descrizione= $_POST['DESCRIZIONE']; // connessione alla base dati $hostName = "localhost"; $userNome = ""; $pasword = ""; $database = ""; $connection = new mysqli ($hostName,$userNome,$pasword,$database); if ($connection->connect_errno) die("Problemi di connessione a Database" . $database); // costruzione della query per l'inserimento dati $query = "INSERT INTO Azioni VALUES ('$data', '$ora', '$luogo','$ente', '$cognome', '$nome', '$grado', '$matricola', '$targa', '$descrizione')"; // esecuzione della query database $result = mysqli_query ($connection, $query ); if (!$result) die("Query errata:" . $query ); // chiusura della connessione mysqli_close ($connection); // ritorno al form //Header required when app and php are of different origins header("Access-Control-Allow-Origin: *"); if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST["DATA"]) && isset($_POST["ORA"])) { // Correct form submission $result = "DATA RECEIVED BY SERVER:" . "<br />La data è = " . $_POST["DATA"] . "<br />L'ora è = " . $_POST["ORA"] . "<br />Il Luogo è = " . $_POST["LUOGO"] . "<br />L'Ente è = " . $_POST["ENTE"] . "<br />IL cognome è = " . $_POST["COGNOME"] . "<br />Il nome è = " . $_POST["NOME"] . "<br />Il Grado è = " . $_POST["GRADO"] . "<br />La Matricola è = " . $_POST["MATRICOLA"] . "<br />La Targa è = " . $_POST["TARGA"] . "<br />La descrizione è = " . $_POST["DESCRIZIONE"]; } else { $result = "INVALID REQUEST DATA"; } } else { $result = "INVALID REQUEST DATA"; } echo $result;
Thanks again for the answer
Hi luishp thanks for the information you gave me, I will take it into account.
I did not explain myself,
On the server I uploaded this php file for inserting data into the database table always created on the server.
The code of the form / form of the APP is in the section SEND / SUCCESS / FAILED ONLY THIS
From mobile the data sent to the form does not reach the server.
from Chrome instead they come
<?php
//RECUPERO VALORI PASSATI DAL FORM
$data = $_POST['DATA'];
$ora = $_POST['ORA'];
$luogo = $_POST['LUOGO'];
$ente = $_POST['ENTE'];
$cognome= $_POST['COGNOME'];
$nome= $_POST['NOME'];
$grado= $_POST['GRADO'];
$matricola= $_POST['MATRICOLA'];
$targa= $_POST['TARGA'];
$descrizione= $_POST['DESCRIZIONE'];
// connessione alla base dati
$hostName = "localhost";
$userNome = "";
$pasword = "";
$database = "";
$connection = new mysqli ($hostName,$userNome,$pasword,$database);
if ($connection->connect_errno) die("Problemi di connessione a Database" . $database);
// costruzione della query per l'inserimento dati
$query = "INSERT INTO Azioni VALUES ('$data', '$ora', '$luogo','$ente', '$cognome', '$nome', '$grado', '$matricola', '$targa', '$descrizione')";
// esecuzione della query database
$result = mysqli_query ($connection, $query );
if (!$result)
die("Query errata:" . $query );
// chiusura della connessione
mysqli_close ($connection);
// ritorno al form
//Header required when app and php are of different origins
header("Access-Control-Allow-Origin: *");
if ($_SERVER["REQUEST_METHOD"] === "POST") {
if (isset($_POST["DATA"]) && isset($_POST["ORA"])) {
// Correct form submission
$result = "DATA RECEIVED BY SERVER:" .
"<br />La data è = " . $_POST["DATA"] .
"<br />L'ora è = " . $_POST["ORA"] .
"<br />Il Luogo è = " . $_POST["LUOGO"] .
"<br />L'Ente è = " . $_POST["ENTE"] .
"<br />IL cognome è = " . $_POST["COGNOME"] .
"<br />Il nome è = " . $_POST["NOME"] .
"<br />Il Grado è = " . $_POST["GRADO"] .
"<br />La Matricola è = " . $_POST["MATRICOLA"] .
"<br />La Targa è = " . $_POST["TARGA"] .
"<br />La descrizione è = " . $_POST["DESCRIZIONE"];
} else {
$result = "INVALID REQUEST DATA";
}
} else {
$result = "INVALID REQUEST DATA";
}
echo $result;
Thanks again for the answer

Quote from luishp on December 10, 2020, 8:03 amHi @llazzari,
Do you get any error message? Note that you can get the server response in your Form [Data] variable. Please take a look at the Form Submit sample app included with VisualNEO Web.
Also, this line of code will take no effect if it is not located at the very top of your .php file, just after "<?php"
header("Access-Control-Allow-Origin: *");This is because header information must be send before any other command.
Also be sure your Form "action" property points to the .php complete path-
This will not work if your app is being executed from outside your server:myphpfile.phpThis will work:
http://mydomain.com/path/myphpfile.phpRegards.
Hi @llazzari,
Do you get any error message? Note that you can get the server response in your Form [Data] variable. Please take a look at the Form Submit sample app included with VisualNEO Web.
Also, this line of code will take no effect if it is not located at the very top of your .php file, just after "<?php"
header("Access-Control-Allow-Origin: *");
This is because header information must be send before any other command.
Also be sure your Form "action" property points to the .php complete path-
This will not work if your app is being executed from outside your server:
myphpfile.php
This will work:
http://mydomain.com/path/myphpfile.php
Regards.
Quote from llazzari on December 10, 2020, 7:51 pmHi luishp I did as you told me but the mobile doesn't work
I attach two videos
Hi luishp I did as you told me but the mobile doesn't work
I attach two videos
Uploaded files:Quote from llazzari on December 10, 2020, 7:54 pmin this video I try to send the data but I do not receive anything, no error reports from the server
in this video I try to send the data but I do not receive anything, no error reports from the server

Quote from Palamar on December 11, 2020, 2:21 amHola!, en el video que envías estás haciendo todo desde el motor de IE, deberías probar en Chrome con la app compilada. Después asegúrate de tener la cabecera en el PHP como se debe y que el href del formulario indique exactamente al archivo PHP. (si es http o https también puede llevar a problemas). Los formularios funcionan perfectamente, los uso habitualmente.
Hola!, en el video que envías estás haciendo todo desde el motor de IE, deberías probar en Chrome con la app compilada. Después asegúrate de tener la cabecera en el PHP como se debe y que el href del formulario indique exactamente al archivo PHP. (si es http o https también puede llevar a problemas). Los formularios funcionan perfectamente, los uso habitualmente.
Quote from llazzari on December 11, 2020, 12:44 pmHi palamar, I checked and the HTTP was not set as HTTPS, I didn't think there was any problem.
what I don't understand why launching the app from Visualneoweb also worked with http.
Thanks to all of you, the Form works and I receive the confirmation data from the server. Have a nice day.
Hi palamar, I checked and the HTTP was not set as HTTPS, I didn't think there was any problem.
what I don't understand why launching the app from Visualneoweb also worked with http.
Thanks to all of you, the Form works and I receive the confirmation data from the server. Have a nice day.