4. Password Protecting

How to password-protect a page using WebDNA

numero = 156
interpreted = N
texte = Now, let's consider you want some privacy: you want to protect protectedpage.dna with a login and a password:
<!--HAS_WEBDNA_TAGS-->[showif [username]!myself][authenticate user][/showif][showif [password]!TRE45][authenticate password][/showif]<html>my protected page</html>
Try it... it will show only if you enter "myself" and "TRE45". Without the login and the password, there is NO WAY to see the page content, even by searching the source code in your browser: it will just not show. Another way? Just add a group ("mygroup") with a login and a password in the WebDNA general admin page, then protect any page with this simple context:
<!--HAS_WEBDNA_TAGS-->[PROTECT groups=mygroup]
That's it, your page is now 100% secure... image >>> Next page... Now, let's consider you want some privacy: you want to protect protectedpage.dna with a login and a password:

<!--HAS_WEBDNA_TAGS-->
[showif [username]!myself][authenticate user][/showif]
[showif [password]!TRE45][authenticate password][/showif]
<html>
my protected page
</html>

Try it... it will show only if you enter "myself" and "TRE45". Without the login and the password, there is NO WAY to see the page content, even by searching the source code in your browser: it will just not show.

Another way? Just add a group ("mygroup") with a login and a password in the WebDNA general admin page, then protect any page with this simple context:
<!--HAS_WEBDNA_TAGS-->
[PROTECT groups=mygroup]

That's it, your page is now 100% secure...

image
>>> Next page... Christophe Billiottet

DOWNLOAD WEBDNA NOW!

Top Articles:

Related Readings:

2. Conditional Programming

Conditional programming with WebDNA...

WebDNACodeSparker FRAMEWORK by Govinda

I am glad to help the beginners...

7. Searching Databases

Searching databases with WebDNA and conclusion...

4. Password Protecting

How to password-protect a page using WebDNA...

5. Writing Files

How to write a file using WebDNA...

3. Passing Data from a Form

Passing data from a form and retrieving it using WebDNA...