Hello, I am trying to pass parameters to a php file, email and password, for login use by following url: " link " and the following warning appears
net :: ERR_NAME_NOT_RESOLVED
Would the parameters be in trouble? Well, when I run the url in the hand "wheel" of course, it warns that the two variables are undefined
Notice: Undefined index: ema in /var/www/vigilantescomunitarios.com/public_html/www/php/login.php on line 17
Notice: Undefined index: sen in /var/www/vigilantescomunitarios.com/public_html/www/php/login.php on line 18
Controller:
var ema = usuario.email;
var sen = usuario.senha;
$http.post("http://www.vigilantescomunitarios.com/php/login.php?ema="+ema+"&sen="+sen).success(function (response){
console.log(response);
}
PHP:
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type,x-prototype-version,x- requested-with');
include_once("conPDO.php");
$pdo = conectar();
$email = $_GET['ema'];
$senha = $_GET['sen'];
echo $email.' - '.$senha;
?>