Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: How to read cookie in the survey?

How to read cookie in the survey? 6 Monate 1 Woche her #105367

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 1
  • Karma: 0
One web site: www.example.com has its own register and login system. Just like limesurvey.

When some body use his username and password login, such as I use mrli999 login limesurvey, the cookie was wrote. fox example cookie abc=("login","yes").

Then how can I read the cookie to check whether in cookier abc, login=yes or not? Can I use php code or js code to read the cookie in the template?

Or can I read cookie and use it in the equation question?

Many many thanks.
Letzte Änderung: 6 Monate 1 Woche her von mrli999.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to read cookie in the survey? 6 Monate 1 Woche her #105378

  • DenisChenu
  • DenisChenus Avatar
  • ONLINE
  • Moderator Lime
  • Beiträge: 6276
  • Dank erhalten: 801
  • Karma: 240
Hi,

You can read cookie in Javascript (if it's the same domain), but remind : cookie is really something without security.

What is the prupose ?

Denis
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

How to read cookie in the survey? 6 Monate 1 Woche her #105393

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5324
  • Dank erhalten: 294
  • Karma: 249
I don't think using cookies is a good approach.

Maybe using webserver authentication would do the trick? Limesurvey offers hooks for this.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

How to read cookie in the survey? 6 Monate 1 Woche her #105410

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 1
  • Karma: 0
Mazi schrieb:
I don't think using cookies is a good approach.

Maybe using webserver authentication would do the trick? Limesurvey offers hooks for this.


Thank you very much. Would you please let me know how to do it in details? Thanks again.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to read cookie in the survey? 6 Monate 1 Woche her #105418

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5324
  • Dank erhalten: 294
  • Karma: 249

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.

How to read cookie in the survey? 6 Monate 1 Woche her #105437

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 1
  • Karma: 0
DenisChenu schrieb:
Hi,

You can read cookie in Javascript (if it's the same domain), but remind : cookie is really something without security.

What is the prupose ?

Denis

Denis,

Thank you very much!

Then is it possible for me to use javascripte to read session in the start.pstpl? if yes, how? thanks again.

In more details:

If there is a session variable exampleid. In some case it's value is 99999999, other 99999998.

In the startpage.pstpl, I would like to check the value is 99999999 or 99999998. If it is 999999, alert and jump to a customer page (such as www.example.com/example/login.php). If it is 99999998, go ahead and pass 9999998 to a question in the survey.

Is it possbile? And how?
Letzte Änderung: 6 Monate 1 Woche her von mrli999.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.153 Sekunden
Donation Image