[ad_1]
So my downside right here is following:
I’ve kind on my web site, which is principally contact kind and I’m storing information from that contact kind into my excel spreadsheets (utilizing API Spreadsheets -> https://www.apispreadsheets.com/).
When I’m utilizing Android machine and my PC (Home windows) to entry the location and fill out the shape, every part wents easily, I get information crammed out on Excel spreadsheets, however once I use iOS gadgets, plainly request on API does not even undergo for some motive.
I do know that every part else goes by means of appropriately and easily as a result of, after somebody affirm kind, I’ve this “thankyou.html” web page and I additionally get an e-mail with information onto my mail, however that information is not saved onto Excel (which ought to be, and as I said earlier than I’m utilizing apispreadsheets to try this). And in relation to sending information onto my e-mail I’m utilizing phpmailer.
I checked my error log file, there’s nothing improper in it.
Now as I’ve no thought what’s the issue, I’m asking how may I probably establish the issue?
Type is contained in the index.php file, I’m utilizing motion="sendmail.php" and utilizing POST methodology.
That is code that I’m utilizing within sendmail.php to create API request:
//FORM SUBMITTING TO SPREADSHEETS
$url= "https://api.apispreadsheets.com/information/*/";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$postJSON = json_encode(["data"=> ["name"=>$name,"email"=>$email,"zelim"=>$iwant,"mobile"=>$mobile,"dateandtime"=>$dateandtime,"distributer_name"=>$distemail]]);
curl_setopt($curl,CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_POST, true);
curl_setopt($curl,CURLOPT_POSTFIELDS, $postJSON);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content material-type: utility/json"));
$consequence = curl_exec($curl);
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code == 201){
// SUCCESS
}
else{
// ERROR CODE
}
[ad_2]
