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 09-Sep-2003, 10:34
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about

Member Login


I have been thinking about which way I want to go for my member login script on my site.

Today I thought about using the default password protected page on my server.

Where when you goto a specific folder that is "protected" it asks you to enter in your username/password in a pop up box.

I want to know if I can, possibly though php, allow a user to enter their username and password inside a text box on my site, and then it will send the information to the protected page, and let them log in without displaying the pop up login box.

I hope I explained that well.

Any ideas?
  #2  
Old 09-Sep-2003, 13:42
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
Nevermind, I pretty much got it to work.

I will post the final code shortly.

Here is how to do it using a button.
HTML Code:
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function Login(form) { var username = form.username.value; var password = form.password.value; var server = form.server.value; if (username && password && server) { var htsite = "http://" + username + ":" + password + "@" + server + username + "/"; window.location = htsite; } else { alert("Please enter your username and password."); } } // End --> </script> </head> <body> <form name=login> <input type="hidden" name="server" value="www.mrbobdouglas.com/"> Username: <input type=text name=username size=20> <br><br> Password: <input type=password name=password size=20> <input type=button value="Login!" onClick="Login(this.form)" name="button"> </form> </body> </html>
  #3  
Old 10-Sep-2003, 06:20
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Do you happen to have a demo version of this script / page?

I am not certain I understand the question even though you've already figured it out.
  #4  
Old 10-Sep-2003, 07:43
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
www.mrbobdouglas.com/design is an example. Enter in bobby for the username and password.

What I did is set up a folder for every client. Then made a password for that client, their username being the name of the folder.
Pretty much, this script just makes the link to the http://bobby:bobby@www.mrbobdouglas.com/bobby/ folder, but includes the username/password so you can skip the page with the password box.
  #5  
Old 10-Sep-2003, 07:51
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Oh! I see, I think I've got it now... but

I get nervous when I see passwords in the URL (or address bar)

One day, I will get to this and then I will update this thread (if someone does not beat me to it).
  #6  
Old 10-Sep-2003, 08:07
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
Sounds good to me. I would rather use php and a mysql db for it all.... But i dunno how to really do that.
 
 

Recent GIDBlogNARMY by crystalattice

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
Hello, New Member Here. Caterwain New Member Introductions 5 21-Nov-2003 00:53
New member site/need projects posted COOLASU New Member Introductions 3 23-Jun-2003 07:55
GIDForums Member List is now disabled. JdS GIDForums™ 0 02-Feb-2003 09:27
New Member Control Panel to be launched soon... JdS GIDTopsites™ 0 10-Jan-2003 18:46

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

All times are GMT -6. The time now is 19:37.


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