Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda