Pelican Parts
Parts Catalog Accessories Catalog How To Articles Tech Forums
Call Pelican Parts at 888-280-7799
Shopping Cart Cart | Project List | Order Status | Help



Go Back   Pelican Parts Forums > Miscellaneous and Off Topic Forums > Off Topic Discussions


Reply
 
LinkBack Thread Tools Rate Thread
Author
Thread Post New Thread    Reply
RKC RKC is offline
Registered
 
Join Date: May 2005
Location: Chicago, IL
Posts: 574
How to Create a simple, single password in Dreamweaver?

I'm finally (I know, I know) migrating from GoLive to Dreamweaver, and just need to make a form with a single, simple password to protect an exam from prying eyes. I am a "pretty colors" sort of guy - I love Illustrator, InDesign and Photoshop, etc., but don't know code.

So what's the deal? I can make the form, found the password field to make the text turn to dots, but how do you assign a value for the password? Can you just protect a page? Can I do a sign up form with a password that leads to another form? Don't care how it's done, really - and I'm not worried about REAL security (no payments, just a test I'm giving that won't change for a year - so I don't want others to see it until they are really taking it). But the test will be a form too, so I can't just do a locked *.pdf.

Help!

FWIW - I'm finally leaving Live Motion 2 also (Adobe's old Flash creator) for Flash CS3 too. A summer of re-learning.....


Last edited by RKC; 06-05-2008 at 02:55 PM..
Old 06-05-2008, 02:46 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #1 (permalink)
Registered
 
slodave's Avatar
 
Join Date: Sep 2005
Location: Encino Man
Posts: 22,394
Garage
Send a message via Skype™ to slodave
Can you put the page you want into a new sub directory? If so, use htaccess.

http://www.javascriptkit.com/howto/htaccess3.shtml

If you use a field, then you would have to use javascript, perl or php to make read the password field.

In php, it would look something like this:
If the password field has a name of password and the password is "test1234", then when variable is passed to the next page, the php code would...

$variable = $password;

PHP Code:
if ($variable == 'test1234') {
echo 
"that is the correct password.";

} else {

echo 
"Sorry, you loose!";


Dave
__________________
Make sure to check out my balls in the Pelican Parts Catalog! 917 inspired shift knobs.

'84 Targa - Arena Red - AX #104
'07 Toyota Camry Hybrid - Yes, I'm that guy...
'01 Toyota Corolla - Urban Camouflage - SOLD
Old 06-05-2008, 02:56 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #2 (permalink)
RKC RKC is offline
Registered
 
Join Date: May 2005
Location: Chicago, IL
Posts: 574
Wow! Thanks for the quick response. I cut and pasted the code and it worked great!

I'll try the htaccess too.

But even the link you sent seems secure enough for what I want.

Thanks again.
Old 06-05-2008, 03:15 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #3 (permalink)
RKC RKC is offline
Registered
 
Join Date: May 2005
Location: Chicago, IL
Posts: 574
BTW - this is best site, hands down, for ANY QUESTION.

Thanks again, slodave! (And Wayne!)
Old 06-05-2008, 03:21 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #4 (permalink)
Registered
 
slodave's Avatar
 
Join Date: Sep 2005
Location: Encino Man
Posts: 22,394
Garage
Send a message via Skype™ to slodave
I'm glad it worked. I forgot to put in the corresponding [INPUT TYPE=PASSWORD NAME=password] for the first page.
__________________
Make sure to check out my balls in the Pelican Parts Catalog! 917 inspired shift knobs.

'84 Targa - Arena Red - AX #104
'07 Toyota Camry Hybrid - Yes, I'm that guy...
'01 Toyota Corolla - Urban Camouflage - SOLD

Last edited by slodave; 06-05-2008 at 05:59 PM..
Old 06-05-2008, 04:11 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #5 (permalink)
Insert Tag Line HERE.....
 
rattlsnak's Avatar
 
Join Date: Nov 2000
Location: Atlanta, Ga
Posts: 9,706
Garage
Send a message via AIM to rattlsnak
BTW, if youre using DW, it will write all the PHP code for you in Design mode. No need to "learn" code!
Old 06-05-2008, 04:20 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #6 (permalink)
 
RKC RKC is offline
Registered
 
Join Date: May 2005
Location: Chicago, IL
Posts: 574
Thanks for the tip. I can cut and paste code - thanks again slowdave - but don't know how to write it - except for some basic way back when.....

Haven't got the htaccess/password stuff to work. Will try again Friday.
Old 06-05-2008, 05:36 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #7 (permalink)
RKC RKC is offline
Registered
 
Join Date: May 2005
Location: Chicago, IL
Posts: 574
One more question though:

If I just cut and paste the simplest code, can't anyone just do the "view source" thing and SEE the password?

I'm dealing with medical doctors in their 40's & 50's mainly, so not really an issue, but I'm curious....
Old 06-05-2008, 05:38 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #8 (permalink)
Registered
 
slodave's Avatar
 
Join Date: Sep 2005
Location: Encino Man
Posts: 22,394
Garage
Send a message via Skype™ to slodave
Quote:
Originally Posted by RKC View Post
One more question though:

If I just cut and paste the simplest code, can't anyone just do the "view source" thing and SEE the password?

I'm dealing with medical doctors in their 40's & 50's mainly, so not really an issue, but I'm curious....
No, the php code will not be visible, only the HTML it displays. The hidden input takes a value (test1234) and passes that in the headers as a variable to the next page.
__________________
Make sure to check out my balls in the Pelican Parts Catalog! 917 inspired shift knobs.

'84 Targa - Arena Red - AX #104
'07 Toyota Camry Hybrid - Yes, I'm that guy...
'01 Toyota Corolla - Urban Camouflage - SOLD
Old 06-05-2008, 05:41 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #9 (permalink)
Registered
 
slodave's Avatar
 
Join Date: Sep 2005
Location: Encino Man
Posts: 22,394
Garage
Send a message via Skype™ to slodave
Here's a simple php/HTML page...

First Page:
PHP Code:
<?php
print "<HTML>\n";
print 
"<TITLE>My Page</TITLE>\n";
print 
"<BODY>\n";
print 
"<FORM ACTION=nextpage.php METHOD=POST>\n";
print 
"Please enter a the password<BR />\n";
print 
"<INPUT TYPE=PASSWORD NAME=password>\n";
print 
"</FORM>\n";
print 
"</BODY>\n";
print 
"</HTML>\n";
?>
nextpage.php...

PHP Code:
<?php

$variable
=$password;

if (
$variable == 'test1234') {
print 
"<HTML>\n";
print 
"<TITLE>Page 2</TITLE>\n";
print 
"<BODY>\n";
print 
"Password is correct.<BR />\n";
print 
"Your data goes here.\n";
print 
"</BODY>\n";
print 
"</HTML>\n";
} else {

print 
"Password is invalid";

}
?>
__________________
Make sure to check out my balls in the Pelican Parts Catalog! 917 inspired shift knobs.

'84 Targa - Arena Red - AX #104
'07 Toyota Camry Hybrid - Yes, I'm that guy...
'01 Toyota Corolla - Urban Camouflage - SOLD

Last edited by slodave; 06-05-2008 at 06:05 PM..
Old 06-05-2008, 05:54 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #10 (permalink)
Registered
 
slodave's Avatar
 
Join Date: Sep 2005
Location: Encino Man
Posts: 22,394
Garage
Send a message via Skype™ to slodave
I'll write the two pages for you, if you want...

__________________
Make sure to check out my balls in the Pelican Parts Catalog! 917 inspired shift knobs.

'84 Targa - Arena Red - AX #104
'07 Toyota Camry Hybrid - Yes, I'm that guy...
'01 Toyota Corolla - Urban Camouflage - SOLD
Old 06-05-2008, 05:58 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #11 (permalink)
Reply


 


All times are GMT -8. The time now is 01:12 PM.


 
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website -    DMCA Registered Agent Contact Page
 

DTO Garage Plus vBulletin Plugins by Drive Thru Online, Inc.