Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!