Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » password textbox


password textbox

Reply
  #1 (permalink)  
Old 12-01-03, 07:23 PM
mpriest mpriest is offline
New Member
 
Join Date: Dec 2003
Location: Abilene, TX
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
password textbox

I've created a web site with 2 pages using Front Page. The second page is a team roster with pictures. I only want the parents to be able to view. On the first page I've created a password textbox with an Enter button. I would like a parent to enter the password, click Enter and if they entered the correct password go to the second page. If not then give an error message. There will only be one password that I will give to the parents so it won't be necessary to keep track of different passwords. Being that this is my first time designing a web page I don't know the code to make this happen. Can someone please help me with the code? Thanks
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-01-03, 07:30 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Location: Michigan
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
here it is:

Code:
Password: <INPUT TYPE="password" value="password">
enjoy
__________________
Elite Bulletin Board
http://elite-board.us
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-05-03, 11:09 PM
Mud Mud is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Southern California
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
It sounds like you need php and javascript also for your password script? Do you like want to password protect some pages? Or what?
__________________
http://websoftblog.com/ - Web Software Blog
http://www.seekpire.com/ Make money searching!
http://www.gamingwise.com/ flash games!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 12-06-03, 10:19 AM
overule overule is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
it is not secure when using javascript to protect yr site. any users can view the source and look at the password.

a php version is more like it.(phpaccess is a good one using .htacess and .htpasswd)

unless u encrypt yr html code,even that can be easily decode using a program download from site

good luck
__________________
<p><font size="2"><b>http://www.overule.net<br>
<font color="#FF0000">
Web Hosting- Serving At The Best!</font></b></font><b><font color="#FF0000">
<br></font><font size="2">Unlimited features</font>
<br></b><font size="2" color="#FF0000"><b>: :RESELLERS: :SHARED HOSTING: : EMAIL HOSTING: : DESIGN: :</b></font>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 12-06-03, 10:57 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Location: Michigan
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
i would say .htaccess is the best choice. i use that for scripts i make and depending on which host u go to, they will have a option to make a .htaccess folder via admin panel which is ezr.
__________________
Elite Bulletin Board
http://elite-board.us
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 12-07-03, 12:48 AM
overule overule is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

most popular control panel allow users to protect their directory using .htacess

CPANEL=>the best
__________________
<p><font size="2"><b>http://www.overule.net<br>
<font color="#FF0000">
Web Hosting- Serving At The Best!</font></b></font><b><font color="#FF0000">
<br></font><font size="2">Unlimited features</font>
<br></b><font size="2" color="#FF0000"><b>: :RESELLERS: :SHARED HOSTING: : EMAIL HOSTING: : DESIGN: :</b></font>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 12-07-03, 07:00 AM
E3ven E3ven is offline
New Member
 
Join Date: Dec 2003
Location: Malaysia, JB
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hey ppl.
http://www.schemo-design.de/news2/news.php

wat i want is similiar to this...
but i dun wan any login name to type in.
wat i want is just a parent password.

1 pass will do.
any1 who type the password correctly can
add news to it.

please help me fast
because i want to make the site fast
my frens and i are going to leave the school ( sad )

and i dun wan to lose contact with them...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 12-07-03, 11:11 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Location: Michigan
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
hmm well then i know a quick code in php that might help:

PHP Code:

<?

$password 
"whatever";

if (
$password == "$password"){

header("Location: http://mysite.com/secret.php");
}
else{
echo 
"sorry wrong pasword, please try again";
}
?>
try that i think that will work
__________________
Elite Bulletin Board
http://elite-board.us

Last edited by darkcarnival; 12-07-03 at 11:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 06-04-04, 11:31 AM
jalmusic jalmusic is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
But wouldn't that mean that anyone who accessed http://mysite.com/secret.php would get to the page that the webmaster would want to protect?

I am having a similar problem: at the moment I have a games page on my website and (because I am a little unfamiliar with PHP, can only do variable assignment in address bar) i have a javascript that, on submission of the form, makes the url /index.php?page=games/thepassword so that it can include the thepassword.html file from the "games" directory.

Is there any way, therefore, that I can have a page at /index.php?page=games or /index.php?page=games/index that will have completely different content from what the user does? At first approach (or if not logged on for more than 5 mins) it will be a password gate, and if already authenticated, it will be the games menu page?

Thanks for your help

Last edited by jalmusic; 06-04-04 at 11:53 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 06-04-04, 11:02 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Location: Michigan
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well what i did was a very very very simple protect script.

you can add like:
PHP Code:

if ($rank == "admin"){

//admin powers
}
elseif (
$rank == "Member"){
//member powers
}
else{
include 
"login.php";

then you would have to make a process file. if you want more help, you can either im or pm me
__________________
Elite Bulletin Board
http://elite-board.us
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lwp error: Receiving http 500 error when submitting..... Qish Perl 1 11-07-03 01:49 AM
In need of a user registration and password protect of a site darksoap Script Requests 2 09-29-03 03:35 PM
acessing password protected folder perleo PHP 1 09-26-03 09:36 PM
php and password Cmrdrv PHP 2 08-05-03 05:14 PM
Using IMAP to change password Man Down PHP 0 07-27-03 04:09 PM


All times are GMT -5. The time now is 01:04 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.