homepage Welcome to WebmasterWorld Guest from 54.227.215.140
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
password protect web pages
how to program open and password protect
weddingm

5+ Year Member



 
Msg#: 4260864 posted 11:36 pm on Jan 31, 2011 (gmt 0)

I see many sites on the net that offer free public self profile pages to their visitors. They also offer the option to make the profile pages private through the use of a checkbox in a form. How can they program this through their db? Is there a php code you can write on a web page that makes it password protected - then the username and password must match what's in the db?

Thanks,
Matt

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4260864 posted 7:33 pm on Feb 1, 2011 (gmt 0)

It's just a bit that needs to be switched on and off. If each time that page loads (outside of cache) you check to see if some check bit is turned on, then you validate the user, otherwise you let them through.

Could be many different ways to implement this, but what works best for you only you would know.

weddingm

5+ Year Member



 
Msg#: 4260864 posted 11:11 pm on Feb 1, 2011 (gmt 0)

I searched the net and found a php code to use. I like it best just to have an access code to view the pages and to verify through the db. Thanks for the reply. Didn't realize how easy this was to do.

Matthew1980

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4260864 posted 11:25 pm on Feb 1, 2011 (gmt 0)

>>Didn't realize how easy this was to do

Ha ha! Only say that sort of thing when it's working and your happy with it :)

Have fun.

Cheers,
MRb

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved