Hi all so here is a code I want to receive data in PHP.
so I have this in QT:
QUrl params;
params.addQueryItem("action","Dodaj_korisnika");
params.addQueryItem("ime","qt");
params.addQueryItem("prezime","QT");
params.addQueryItem("broj","998873");
params.addQueryItem("adresa","kkakka");
QByteArray data;
data.append(params.toString());
data.remove(0,1);
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
QNetworkReply *reply = manager->post(QNetworkRequest(url), data);
connect(reply, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
How to write PHP to retireve array.
I have tried this:
$_FIELD=array(
"action" => $_POST{action},
"ime" => $_POST{ime},
"prezime" => $_POST{prezime},
"broj" => $_POST{broj},
"adresa" => $_POST{adresa}
its not working
and this:
$_POST array($_POST['action'],$_POST['ime'],$_POST['prezime'],$_POST['broj'],$_POST['adresa'];
still not working..any idea what is right way to get post data..
);
$_POSTis like any other array in PHP and can be accessed like this:To see whats in there you can use: