In phonegap I have an issue while calling a PHP file using jQuery AJAX. The error that occurs while calling the file is:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Google said to put this code header('Access-Control-Allow-Origin: *');
in the current PHP file header. I put the code in the header, but still no changes. I've attached my jsfidde with it.
The file connectionsqlphp.php
code is here
<?php
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
echo "hi";
?>