28, May 2012

Login not re-directing - 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: Login not re-directing
« previous next »
Pages: [1] Print

Author Topic: Login not re-directing  (Read 1297 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Feb 27, 2007, 11:12:20 am »

I have just installed Access_user Class and most of it is working fine - I can register and confirm registration from the email.

However, I can't seem to get the correct target page to display:-
I access testpage.php or example.php and, as expected directs me to login.php.
I enter username and password and it appears to accept the details but sends me to login.php

If I change the default variable in db_config.php to
  define("START_PAGE", "/tab12.php");     [where tab12.php has no Access_user Class code in it]
then it will direct me to tab12.php after I have logged in correctly.

So it seems to me that the code is working correctly, but the line
  $page_protect->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']);
is failing to redirect to the original requested URL

What am I doing wrong?
Kind regards
Mark
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Feb 27, 2007, 11:43:38 am »

Hello,

"echo" these vars on the page (f.e. example.php) you are trying to access:

$_SERVER['PHP_SELF']
$_SERVER['QUERY_STRING']

to see if these vars are filled

Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Feb 27, 2007, 11:49:24 am »

olaf,

Thanks for your lightning reply.

I have just read through the other posts and found the answer I was looking for!  Embarrassed
Topic: Problem with access_page() 

I have now re-set the line in db_config.php to define("USE_MYSQL_SESSIONS", false);
and it works just fine

Looks like a very useful bit of code.
Many thanks
Mark
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6122
Tags : login redirect 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: Login not re-directing
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 05:16:16 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.