•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Web Developers' Lounge section within the Web Development category of DaniWeb, a massive community of 456,562 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,507 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Web Developers' Lounge advertiser: Search Engine Optimization
Views: 1428 | Replies: 1
![]() |
•
•
Join Date: Oct 2007
Location: Pennsylvania, US
Posts: 37
Reputation:
Rep Power: 2
Solved Threads: 3
Use a simple PHP script with a static username and password and maybe a javascript prompt form, or standard HTML prompt form.
Or something like that. Not very secure though. But works.
php Syntax (Toggle Plain Text)
<?php $username = "myusername"; $password = "mypassword"; if (!isset($_POST['submit'])) { ?> <form method="POST" action="<?=$_SERVER['PHP_SELF']?>"> Username: <input type="text" name="username"><br/> Password: <input type="password" name="password"><br/> <input type="submit" name="submit" value="Login"> <?php } else { if ($_POST['username'] == $username && $_POST['password'] == $password) { echo "<a href="privatepage.html">Click to continue...</a>"; } } ?>
Last edited by maddog39 : Oct 24th, 2007 at 9:06 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Web Developers' Lounge Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
adult advertising blog browser browsing community company data design development devices domains firefox google html india intel internet java legal linux marketing math microsoft mobile applications mozilla msn multimedia navigation news php privacy report research rss search security seo sex software sun survey technology video w3c web web development wiki xml yahoo
- How to password protect a file folder (Windows NT / 2000 / XP / 2003)
- Password protect code (JavaScript / DHTML / AJAX)
- How do I password protect folders? (Windows NT / 2000 / XP / 2003)
- password protecting (HTML and CSS)
- password protect folder on a network (Network Security)
Other Threads in the Web Developers' Lounge Forum
- Previous Thread: mailto: selection
- Next Thread: Math Ml


Linear Mode