Get support from Xavier Media
It is currently Sun Dec 08, 2013 7:45 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Cookie Password Protection 2.7
PostPosted: Tue Aug 22, 2006 4:37 pm 

Points:
Hi,

I installed the script to password protect the website, and it works great. I was wondering if there was a way to setup a script so that after login to the website, a user could click a button, and depending on what username and password he entered, it will redirect him to his personal page. Please let me know if you need more explanation on what I am trying to do.

Any help is greatly appreciated!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 22, 2006 6:44 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Search the forum! This question has been answered at least 50 times.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Double login
PostPosted: Thu Aug 24, 2006 3:40 pm 

Points:
Thank you.
I found a post at http://www.xavierforum.com/about4238.html, and it was helpfull. So now I am trying to figure out how to have users login twice: once to the main site, and then with another set of usernames and passwords to personalized pages. The first login to the main site works great. However, the second login within the website, which will redirect users to personal pages is giving me problems. I tried creating a second login page like members1.php, and placed a code at the top of the page

<? include("protection.php"); ?>

<?
if (file_exists("$loginname.php"))
include("$loginname.php");
else if (file_exists("$loginuser.php"))
include("$loginuser.php");
else
echo "No user file found! - $loginuser";
?>

I get an error

Warning: Cannot modify header information - headers already sent by (output started at /path/members1.php:3) in /path/codelock.php(3) : eval()'d code(1) : eval()'d code on line 132

Warning: Cannot modify header information - headers already sent by (output started at /path/members1.php:3) in /path/codelock.php(3) : eval()'d code(1) : eval()'d code on line 133

Fatal error: Cannot redeclare fileprotect() (previously declared in /path/codelock.php(3) : eval()'d code(1) : eval()'d code:145) in /path/codelock.php(3) : eval()'d code(1) : eval()'d code on line 145

Please HELP!!!!!!!!!!!!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 24, 2006 4:09 pm 

Points:
Ok, I'm not really an expert at this software, but...

It seems that rather than having certain people login twice it would be easier to create a new group of users and create a link to your member page that could check if the user is a member of that group and if they are allow them access.

The way I understand it both usergroups would have access to the pages with the normal php include header, but only the group you add your members to in the admin would be able to get into the member pages that would have a different header.

Hope this helps,

Don


Last edited by antilles on Thu Aug 24, 2006 5:24 pm, edited 1 time in total.

Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 24, 2006 4:39 pm 

Points:
There is a way to do individual personal pages for each user too, but if its a section for a group of users a new user group would be easier than multiple pages. Unfortunately, there doesn't seem to be a way to automatically redirect users to a certain page after they log in so they either have to go to it directly or follow a link that others will not be able to open.

Allowing an individual user to open a page:
http://www.xavierforum.com/viewtopic.php?t=4044

Allowing a group of users to open a page:
http://www.xavierforum.com/viewtopic.php?t=4059

Page header that allows the admin user group to open a page:
Quote:
<? $groupaccess = "AND ugroup = 'admin'";
include("protection.php"); ?>


Page header that allows the admin and users groups to open a page:
Quote:
<? $groupaccess = "AND (ugroup = 'admin' OR ugroup = 'users')";
include("protection.php"); ?>


Say hello username:
http://www.xavierforum.com/archive/7_1519.php


Don


Report this post
Top
  
Reply with quote  
 Post subject: Double login
PostPosted: Thu Aug 24, 2006 6:50 pm 

Points:
I know how to set up different user groups. However it is not what I need to do for the website. I need to password protect the whole website with one set of usernames and password. After the users log in they will click on the button which will bring them to another user login page. At that login, they will enter their personal usernames and passwords that will redirect them to their personal pages.

Appreciate your help!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 24, 2006 7:28 pm 

Points:
Ok I tried. :)

I don't think you can actually redirect the way you describe.

bylla wrote:
It's not possible to "redirect" a user to a specific page after successfull login...
http://www.xavierforum.com/about4059


Don


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 24, 2006 9:10 pm 

Points:
Bylla,

Please help!!!!
I saw in the post http://www.xavierforum.com/about4238.html, that it is possible to redirect users to their personal pages according to their username and password. All I need to know is how to set up double logon. One for the whole website, and another one from within, to users personal pages according to their username and password. Please view more detailed description before this post.

Thanks in advance.


Report this post
Top
  
Reply with quote  
 Post subject: Double login
PostPosted: Thu Aug 24, 2006 10:07 pm 

Points:
You know it seems to be working now. the only problem I am having is at the second logon page. After I enter username(test) and password(test) and it redirects me to the corresponding page (test.php). Test.php page shows above the logon page. Is there a way to hide the logon page?


Report this post
Top
  
Reply with quote  
 Post subject: Re: Double login
PostPosted: Fri Aug 25, 2006 1:44 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
dana wrote:
I know how to set up different user groups. However it is not what I need to do for the website. I need to password protect the whole website with one set of usernames and password. After the users log in they will click on the button which will bring them to another user login page. At that login, they will enter their personal usernames and passwords that will redirect them to their personal pages.

Appreciate your help!
This is not possible, since it's too out-dated way to handle unique member pages.

They way to give people access to individual pages are something like this:
Code:
<?
if (file_exists("$loginname.php"))
include("$loginname.php");
else if (file_exists("$loginuser.php"))
include("$loginuser.php");
else
echo "No user file found! - $loginuser";
?>
You can of course also replace include("$loginuser.php"); with your page directly in the first script if you like.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Registered users: xlreariasd


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]