28, May 2012

Logging in while in public area. - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Logging in while in public area.
« previous next »
Pages: [1] Print

Author Topic: Logging in while in public area.  (Read 1592 times)
Where are my glasses?
*
Posts: 22
176 credits
Members referred : 0



« on: Sep 23, 2006, 03:06:55 am »

There are Public areas and Private areas. I would like to have Log-in/out form elements on public pages that log the user in, but return them to the same public page they logged in on (leaving the user to continue browsing in Public areas, but also able to browse to Private areas if they wish). Possible?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Sep 23, 2006, 09:27:18 am »

There are Public areas and Private areas. I would like to have Log-in/out form elements on public pages that log the user in, but return them to the same public page they logged in on (leaving the user to continue browsing in Public areas, but also able to browse to Private areas if they wish). Possible?
This option is done via this value:

Code:
<?php
$test_page_protect
->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']);

try the example "testpage.php" and check this information from the manual:


testpage.php
I created this optional page to show how this class take care of previous pages if the user have to login first.

$test_page_protect->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']) // set this method, including the server vars to protect your page and get redirected to here after login

Use this method the same like before, except that you enter these two server variables.

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4218
Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Logging in while in public area.
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:32:47 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.