GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-May-2006, 10:01
Denis Denis is offline
New Member
 
Join Date: May 2006
Posts: 4
Denis is on a distinguished road

password protection


I viewed http://www.gidforums.com/t-887.html in my effort to add authentication for visitors of pages in a specific folder at our non-profit site. As a bit of a noob, I'm not entirely clear on these points:

1. Where does the "engine" script go, and what should the script be called?
2. I'm likewise unclear on the "secret" pages, whether they're both required, and what they do, and where they go.

Can anyone help or point me to a tutorial?

With much gratitude ... !
  #2  
Old 11-May-2006, 10:20
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 841
admin will become famous soon enough

Re: password protection


Quote:
Originally Posted by Denis

1. Where does the "engine" script go, and what should the script be called?

Anywhere, it can be saved anywhere... It can be renamed to anything. For example, you could name it login.engine.php and you could save the file to:

/home/denis/test_dir/login.engine.php

Quote:
Originally Posted by Denis
2. I'm likewise unclear on the "secret" pages, whether they're both required, and what they do, and where they go.

These are simply example pages ... There could have been one or many more (you get to decide). They could be named anything. The important thing is that they all include the lines:

PHP Code:

<?php
// FILENAME: ??????.PHP
// ---------------------------------------

// include the login functions file
include_once( '/home/denis/test_dir/login.engine.php' );
?>
<html>
...


Ask again if you still need help.
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #3  
Old 11-May-2006, 12:20
Denis Denis is offline
New Member
 
Join Date: May 2006
Posts: 4
Denis is on a distinguished road

Re: password protection


I have created the scripts as .php files and corrected the paths where they appear. Now that I understand that a "secret" file just means that it's a protected file, it would also help to know how I can add that code to my existing protectable files. For example, do I incorporate the lines into existing .shtml pages and rename them?

And the most important thing is how do visitors register under their own chosen passwords? Presumably that's what should happen? I don't see anything that seems to provide for this.

Thank you again.
  #4  
Old 15-May-2006, 08:29
Denis Denis is offline
New Member
 
Join Date: May 2006
Posts: 4
Denis is on a distinguished road

Re: password protection


Nobody has responded to this, so it's hard to know whether others have actually had success with this script.

Since I haven't had this working, I again ask how a visitor registers so that he can be authenticated. I gather some kind of data file must be created to store names and passwords. How else can this script (or any script) confirm that someone is allowed to access a protected page?
  #5  
Old 15-May-2006, 08:37
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 841
admin will become famous soon enough

Re: password protection


I didn't reply with an example because everybody has different ways of storing their membership data. In other words, one example may not work for you, especially if you want something that you can just copy and paste and have it work on your site.

If you give me some ideas what you will be storing and an indication how much you know about MySQL (creating dbs, tables and querying), then I can (maybe) suggest a script or 2.
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #6  
Old 15-May-2006, 08:47
Denis Denis is offline
New Member
 
Join Date: May 2006
Posts: 4
Denis is on a distinguished road

Re: password protection


Our data is very small and very simple. At best -- and this is pushing it -- we'd have 150 usernames and passwords. I don't know anything about MySQL, but of course I have access to the table setups and can probably work my way through it.
  #7  
Old 15-May-2006, 08:51
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 841
admin will become famous soon enough

Re: password protection


No, it doesn't matter how many members you have in your database.

We are interested in the (db) table layout. If you can paste that here, I can write an example script tailor-made for your table structure.

It will help you understand the steps better...
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess with e-mail address and password Zicon Apache Web Server Forum 4 11-Sep-2006 15:38
can I make htdocs subfolder invisible without password protecting it?? asinsh Apache Web Server Forum 1 29-Jun-2004 15:39
password protection doria Web Design Forum 2 21-Apr-2004 07:01
Hide password skyloon MySQL / PHP Forum 2 08-Jul-2003 09:51

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 14:33.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.