LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-01-2004, 05:05 PM   #1
msound
Member
 
Registered: Jun 2003
Location: SoCal
Distribution: CentOS
Posts: 465

Rep: Reputation: 30
php and htaccess


Right now I use htaccess to password protect most of my website. However, I use cookies to display user specific content. To make the cookies, the user has to fill in their id and password on an online form. Is there a way to set a cookie based on apache .htaccess logins? I think this may refer to sessions but I haven't learned about that yet. I've looked through a few books and googled this question but I havent had any luck. Is there an easy script that will let me set a cookie with php to store the htaccess login info? And is there anyway to bypass htaccess protection if the cookie is stored?

In short, is there a way to get php and htaccess to work together, and if so how?
 
Old 05-01-2004, 10:18 PM   #2
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Check out some of the PHP articles at DevShed:

http://www.devshed.com/c/a/PHP/

Specifically:

http://www.devshed.com/c/a/PHP/User-...pache-And-PHP/

and

http://www.devshed.com/c/a/PHP/Creat...-Login-Script/

Enjoy!
--- Cerbere
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess and php automation belorion Programming 3 01-18-2005 04:23 PM
.htaccess + PHP, without password prompt woranl Programming 5 11-26-2004 01:04 PM
php.ini / .htaccess memory issues rioguia Linux - Software 2 11-19-2004 01:41 PM
.htaccess .html -> .php timmy01 Linux - General 2 09-07-2003 05:30 AM
Constant login popup with htaccess and php once Linux - General 2 05-21-2003 01:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration