For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > February 2005 > Authentication with cookies









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Authentication with cookies
David Ehmer

2005-02-22, 8:55 am

Hi

I'd like to limit access to some resources on a site unless a visitor
provides their email address. If they do provide an address, I'd prefer
they didn't have to re-enter it every time they entered that part of the
site.

Appreciate suggestions as to how this could best be achieved.

My initial thought was to display an input field upon the user selecting the
link to allow entry of their email address. Submitting would then allow
access and would send a cookie to the visitors's browser. Re-entering the
page after this by selecting the link would search for the cookie and allow
access directly if it was present.

Are there any tutorials or articles that could solve this problem?

Thanks
David


Michael Vilain

2005-02-22, 8:56 pm

In article
<421af0fe$0$24215$5a62ac22@per-qv1-newsreader-01.iinet.net.au>,
"David Ehmer" <ehmer@iinet.net.au> wrote:

> Hi
>
> I'd like to limit access to some resources on a site unless a visitor
> provides their email address. If they do provide an address, I'd prefer
> they didn't have to re-enter it every time they entered that part of the
> site.
>
> Appreciate suggestions as to how this could best be achieved.
>
> My initial thought was to display an input field upon the user selecting the
> link to allow entry of their email address. Submitting would then allow
> access and would send a cookie to the visitors's browser. Re-entering the
> page after this by selecting the link would search for the cookie and allow
> access directly if it was present.
>
> Are there any tutorials or articles that could solve this problem?
>
> Thanks
> David


Where have you looked for articles and tutorials? The basic PROGRAMMING
IN PHP book I bought from O'Reilly

http://www.oreilly.com/catalog/progphp/

discusses this under sessions. Their more "how do I do ..." PHP COOKBOOK

http://www.oreilly.com/catalog/phpckbk/toc.html

has this very problem in the table of contents. You might want to pick
these books up either on-line or at your local technical book store.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com