Phil042 said:
I have a website which contains a comments page. I use this page for
comments and enquiries for our club.
Other individuals access my website and leave spam of questionable
taste in my comment book, which eats up alot of space.
Is there a way of blocking these users and only allow those who
genuinly want to leave comments on the page..?
I really need help in this area
Thanks
You can replace the comments page with a page to ask for a password. If it
is correct then the comments page is called
My password page (named captcha.asp) has this:
<div align="left">
<p>Read this Password:<img src="images/display/password.bmp" align="top">
<form action="add_form.asp" method="post">Type Password here:
<input type="text" name="new_password" size="10" /></p>
<p><input type="submit" value="Submit" /></p>
</form>
</div>
password.bmp is a distorted image of a 6 letter password. It was created
from captcha but any image editor could do it.
In add_form.asp, I test for the password value and then continue if OK
Like this
<!--#include file="_fpclass/login_password.inc"-->
<%If (Request("new_password") <> Entrypw) Then%>
<p><h2 class="warning">The password you supplied was invalid.</h2></p>
<!-- Return to captcha.asp -->
<form method="post" action="captcha.asp">
<input type="submit" value="Click to Retry" /></p>
</form>
<!-- Return to guestbook.asp (Displays comments)-->
<p><a href="guestbook.asp" target="_self">
Back to Guestbook</a> </p>
<%Else%>
<!-- The code to continue goes here -->
Note that the password is checked against Entrypw. This is on an included
asp file ("_fpclass/login_password.inc") so cannot be read by the visitor
Its contents are
<%
Dim Entrypw
Entrypw = "psword"
%>
Of course the password is NOT "psword", it is the same as on the image file.
I hope this is not too complex. Once set up, it works like a charm
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website:
http://trevorl.mvps.org/
----------------------------------------