There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
How to setup so user has to enter password to view site using Dreamweaver


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
21-Feb-2007, 10:59 PM #1
How to setup so user has to enter password to view site using Dreamweaver
I am using Dreamweaver MX. I am wanting to setup a site that when a user types in the URL it comes to a page that the user has to enter a username and password in order to go beyond that page. I don't know anything about PHP or server-side or anything. I was hoping there was something in Dreamweaver, maybe even behaviors, that will allow this to happen. I was wanting to be able to enter peoples names into a database within Dreamweaver and if the person who types things in doesn't type the right username or password then they don't get in.

Please help me in getting the accomplished.
Thanks,
Senna
MMJ's Avatar
MMJ MMJ is online now
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
22-Feb-2007, 02:24 AM #2
There have been many threads like this in this forum. Have you tried a search?
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
22-Feb-2007, 11:32 AM #3
MMJ,
Thanks for your reply.
I did go to search before I posted but everything I read talked about PHP and server-side. Things I have no idea about. I was hoping I could find something where I could just add usernames and passwords to a script or even a Dreamweaver Behavior. I'm do know how to use Dreamweaver but when it comes to PHP or server-side stuff I am totally lost.
I also did a google search but couldn't really find anything..

thanks again for your help,
Senna
MMJ's Avatar
MMJ MMJ is online now
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
22-Feb-2007, 12:37 PM #4
Dreamweaver isn't like a language or anything, it uses languages like html, css, php, asp, etc.

If you want to put a password you will have use server side (php, asp), client side (js, vbs), or with .htaccess

which one do you want?
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
22-Feb-2007, 07:57 PM #5
MMJ, thanks again for the reply.
I do know that Dreamweaver uses languages and that it is not a language itself. My problem is I don't know anything about css, php, or asp. I do know HTML. I think when I wrote dreamweaver behavior I meant to say javascript behaviors that are within dreamweaver. Like forms, roll-over images etc. That was my fault as I miss spoke.

I am trying to find client-side. Lke javascript or something. Was hoping that I might be able to find a script or somehting that I could copy and make username and password modifications to fit the people I need to allow access too.
I am actually trying to help someone else set this up on there webpage and not my own. Not sure how many names they will be using.
I hope this makes since.

Thanks again.
Senna
MMJ's Avatar
MMJ MMJ is online now
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
22-Feb-2007, 10:23 PM #6
Client side would be way easy to bypass since you can turn js off and also you can view the source. You should either use php or .htaccess.

If only a small amount of people are going to signin then you can use that php that is posted in other threads or else you might want to get a forum or CMS.
__________________
Guys, please, this is free tech support, act accordingly.

afk for a while
knight_47's Avatar
Senior Member with 1,187 posts.
 
Join Date: Mar 2006
Location: →
Experience: Um... Green?!
22-Feb-2007, 11:13 PM #7
Hello Senna,

If you want something client side, you can try this, though it is not recommended for it is pretty easy for a computer savvy guy to bypass this.

Another easy one, and very secure one is using your .htaccess file, click here to start.

But if you still want to use PHP, you first need to make sure your host supports PHP.

Once you can confirm that, you can try a simple password script like this that I wrote. If you notice, this one only needs a password, if you want it to use a username AND a password, simply edit this line:

PHP Code:
if ($_POST['Submit'] AND $_POST['pass'] == "admin"
to this:

PHP Code:
if ($_POST['Submit'] AND $_POST['pass'] == "admin" AND $_POST['username'] == "username"
You just need to make sure that the username field is called username, and the password field is named admin. (You said you know html, so you should know what I'm talking about)

Hope that helped, and feel free to ask more questions if I didn't make sense.
__________________
MMJ's Avatar
MMJ MMJ is online now
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
23-Feb-2007, 02:51 AM #8
Thanks knight.
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
24-Feb-2007, 05:08 PM #9
Thanks for your replies!
I went to http://tools.dynamicdrive.com/password/
And here is where I am at:
I went to the above script and created in notepad a file named .htaccess and inside this text file is the following code:

AuthName "Restricted Area"
AuthType Basic
AuthUserFile www.yesterdaysneuz.com/.htpasswd
AuthGroupFile /dev/null
require valid-user

I then created in notepad another text file called .htpasswd and inside that text file is the following text:

Rob:wEELa87Gj.gRg

__________

Part of my problem is I am not sure what to put for this line:
AuthUserFile www.yesterdaysneuz.com/.htpasswd

my website is www.yesterdaysneuz.com. It is being hosted by GoDaddy so I am really not sure what my exact path is. I know it should look something like: /home/site_name/. But I am not sure what should go in the "home" spot.
I think in the site_name should be "www.yesterdaysneuz.com" Is that right??


Ok, after I created these two text files I uploaded them to my GoDaddy account. Am I suppose to create any type of form fields for them? I thought I could create these files and then it would be like a Windows prompt???

Thank you for your help.

Senna
knight_47's Avatar
Senior Member with 1,187 posts.
 
Join Date: Mar 2006
Location: →
Experience: Um... Green?!
24-Feb-2007, 05:18 PM #10
^^ did it work?
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
24-Feb-2007, 07:38 PM #11
knight_47,
No it did not work. Any idea what I did wrong??
knight_47's Avatar
Senior Member with 1,187 posts.
 
Join Date: Mar 2006
Location: →
Experience: Um... Green?!
24-Feb-2007, 08:17 PM #12
Hello Senna,

The problem is here where you thought:

AuthUserFile www.yesterdaysneuz.com/.htpasswd - this is wrong, you just need your site's directory only.

try this instead:

AuthUserFile /public_HTML/

Also, there is no need to create a form, it should do that by it's self, for an example, click here, that's how it should look like.
__________________
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
24-Feb-2007, 09:28 PM #13
knight_47,
thanks for your patients!
Ok, I'm still doing something wrong as that didn't work

my .htaccess file now looks like this:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /public_HTML/
AuthGroupFile /dev/null
require valid-user

And my .htpasswd file looks like this:
Rob:wEELa87Gj.gRg

I have also done a screen capture from my dreamweaver. I'm sure I miss understood about the AuthUserFile /public_HTML/ line. Maybe I was suppose to put something else there. I know you said I just need your site's directory only. But not sure what that exactly is. In my screen capture I put my mouse over where it says "site- yesterdaysneuz (C:\Documents and Settings\Rob\My Documents\Websites\Yesterdaysneuz website) "

Sorry that I am confused on this and thanks again for your patients!

Senna
senna's Avatar
Senior Member with 229 posts.
 
Join Date: May 2002
Location: KY
24-Feb-2007, 10:20 PM #14
Sorry forgot to add the file
Attached Thumbnails
how-setup-so-user-has-screenshot.jpg  
knight_47's Avatar
Senior Member with 1,187 posts.
 
Join Date: Mar 2006
Location: →
Experience: Um... Green?!
24-Feb-2007, 10:48 PM #15
Oh ok I think I see the problem, the problem is in the naming you gave the files, it should not be .htaccess.txt it should be .htaccess only! Your computer might prevent you from having just an extension, without a name, so you can just upload the file and remove the .txt while it's on your server.
__________________
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:15 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.