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

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: password.php
PostPosted: Mon Apr 03, 2006 4:26 pm 

Points:
I downloaded this file and uploaded it to a site...it comes up nicely but after entering user name and password, it won't go to the specified link. It's an HTML file. Does the HTML have to reside in the php directory...just a shot in the dark.

Thank you for all of your help on this.

con


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Mon Apr 03, 2006 6:06 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
The password protection script was replaced in 2001 by Cookie Password Protection because it works much better than the old password protection script. I suggest you download the free version of CPP and give it a try.

_________________
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:
PostPosted: Mon Apr 03, 2006 6:52 pm 

Points:
Thank you for answering.

A quick question before I download the other one...sorry if the question has an obvious answer...do the linked files have to be .php files? Or can they be .html files?

And if both are possible, what piece of code would go into the .html pages?

Such as this one for the .php...

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


????

Thanks

C


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 04, 2006 5:24 am 
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
If your files are .html files you can protect them in the same way as .php files by simply renaming the files to something.php. Then you use the same code as you protect all your other .php files.

_________________
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:
PostPosted: Tue Apr 04, 2006 12:21 pm 

Points:
So the answer is yes, they have to be .php. Got it.

I downloaded the "newer" version but honestly, I like the password.php better. It's so much simpler. I don't really want a log-in page...the pop-up dialogue box is much more to my liking. Isn't there a way to tweak that so the linking to pages works?


Thanks,

C


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 04, 2006 4:13 pm 

Points:
At this point, since I haven't heard anything back, I uploaded the one you recommended. It works except for the changes to the login page I made. Even after overwriting the one you have provided, it defaults to the simple white bckgd with the two boxes for name and password.

Why is that? What am I forgetting?

Thanks,

C


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 04, 2006 5:18 pm 

Points:
Okay, I fixed the above...forget that.

My big question is now...how can I get each user name w/ associated password to link to different file????

Again, thank you for any and all help.

C


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Wed Apr 05, 2006 2:54 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
Please take a look at the following posts:
http://www.xavierforum.com/viewtopic.php?t=4044
http://www.xavierforum.com/viewtopic.php?t=4059
http://www.xavierforum.com/archive/7_1519.php

_________________
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:
PostPosted: Thu May 04, 2006 2:05 pm 

Points:
Okay. I have studied the links you sent along for this issue...each user name/passowrd goes to a different page....and unfortunately, I'm still confused.

This code:
Code:
<? 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";
?>

goes on each protected page? The settings.php doesn't change?

What I would like is: after username and password are entered from the login page, to go to their corresponding page.

How do I do that?

Thanks,

Con


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu May 04, 2006 3:13 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
con wrote:
What I would like is: after username and password are entered from the login page, to go to their corresponding page.

How do I do that?
Use the code you included in your post.

_________________
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:
PostPosted: Thu May 04, 2006 4:04 pm 

Points:
Sorry about my ignorance in these matters but...do I change the username in the above code, to the real username...like user1...in both lines?

Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu May 04, 2006 4:06 pm 

Points:
sorry...I meant loginname for username...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu May 04, 2006 5:00 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
You don't have to do anything. When a user logs in with for example goofy as login name the file goofy.php will show up, but the user will not see goofy.php in the web browser.

_________________
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:
PostPosted: Thu May 04, 2006 6:44 pm 

Points:
I just tried that and it just goes to the clients_lounge.php I initially created for all three username/passwords.

One of the usrname/passw is gary/drivingforce. For that one, I created a gary.php page.

In the settings.php I have
$PHP_SELF = "/php/clients_lounge.php";

Do I have to change that too?

Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu May 04, 2006 6:51 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
If you are on a real server (read Unix/Linux) then you should remove the line with $PHP_SELF. That line should only be used on Windows servers that don't work as they should.

When gary login at clients_lounge.php he will see the content of gary.php if you did everything correct. In the URL field of his web browser he will still see clients_lounge.php.

_________________
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  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Registered users: No registered users


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 ]