Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $http({
- url:'http://xxx.xxx.xxx.xxx:8080/login',
- method:"POST",
- data:{user:$scope.user, password:$scope.password}
- })
- $app->post('/login', function ($request, $response) {
- //Parametros que se pasan a la api
- $input = $request->getParsedBody();
- $req = $input['usuario'];
- $md5pass = md5($input['password']);
- $sth = $this->db->prepare("query");
- //bindParam pasandole los parametros para evitar injecciones sql
- $sth->bindParam("password", md5($input['password']));
- $sth->bindParam("usuario", $input['usuario']);
- $sth->execute();
- $todos = $sth->fetchAll();
- $cliente_id = $todos->cliente_id;
- ....
- OPTIONS http://xxx.xxx.xxx.xxx:8080/login net::ERR_CONNECTION_REFUSED
Add Comment
Please, Sign In to add comment