Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
How to make cookies?

I created a connection to my database using this topic: https://www.codeproject.com/articles/1005150/posting-data-from-ionic-app-to-php-server

I redirected my user to a menu after login.

I need to have some kind of session cookie on my PHP server side (the one that makes the queries to my database). This would allow me to be able to reuse the email and the password that the user entered during his connection. And not oblige him to inform him again. I have seen several solutions including SQLITE and LocalStorage, none of these two solutions work.

I also have another problem, on the side of my php server, I do all of my queries. I have one that is supposed to return the following table:

libDiscipline Note
physic        15
mathematic    12
chimi         11 

that I retrieve in my controller using $ scope. I can not display more than two first values which is physic and 15 but I want to display the others informations like mathematic 12 and chimi 11.

This is my script php and my controller which he take the informations of my table.

scriptphp

and my controller is :

.controller('CompteCtrl', function($scope, $http, $state) {

  $scope.data = {};

  $scope.nextpage = function(){
    var link = (the link of the path to my script php ) ;

    $http.post(link, {usermail : "test@test.com" }).then(function (res){
      if(res.data != ""){
        $scope.informations = res.data;
      }
    });
  };
})

As you can see , the usermail will be my future cookie like $_SESSION['email'].

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda