reading a list and setting a cookie for posting privilige

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
On my website when a viewer clicks on a navigation link to a certain
page, I would like:
1. check if there is a cookie set identifing him
2. if there is to continue to the content of the page.
3. if no cookie is found pull up a page asking for an email address
   check that address against a list of email address for the
   if is a member set a cookie
4  if not explain that only members can post but everyone can read

I am looking for this already done (why reinvent the wheel) Or at
least the bits and pieces of code to cobble together this routine.

I have been searching the web and found getcookie and setcookie but
nothing on parsing/read file/list. What keywords should I be using for
this search?


Re: reading a list and setting a cookie for posting privilige

Dave Kelly wrote:
Quoted text here. Click to load it

Just saw this was cross-posted to c.l.p, also.

Most users use a database for such things.  There are a few scripts out
there, but I've never used them.  Such a function is so trivial that I
find it faster to write myself instead of trying to find and integrate
someone else's script.

And don't use cookies for security-related information.  Use sessions

Changed the FUP to comp.lang.php, since you posted it here, and alt.html
for one message.  Further FUP's should be to comp.lang.php only (it's
not applicable to alt.html or alt.www.webmasters).

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline