0
Hello, I am trying to pass parameters to a php file, email and password, for login use by the following url:"http://www.vigilantescomunitarios.com/php/[email protected]&sen=12345" and the following warning appears
net:ERR_NAME_NOT_RESOLVED
Would the parameters be in trouble? Because when I run the url at hand "http://vigilantescomunitarios.com/php/login.php" wheel and of course, 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;
?>
The problem is in
www.
, there is no such subdomain, so you cannot find the address. If you accesshttp://vigilantescomunitarios.com/php/[email protected]&sen=12345
(note: without thewww.
!) it will carry normally.– Inkeliz