Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Valid a bogus "comment" field entry 1

Status
Not open for further replies.

deadweb

Technical User
Nov 26, 2002
11
US
In a simple, regular textarea field:

<input type=&quot;text&quot; name=&quot;comments&quot; size=&quot;60&quot;>

Some goofball is just submitting a repeating character, i.e. &quot;9999999999999999999999999999999999999999999999999..etc&quot; He might submit 200 repeats of any given character. No spaces. Not always a number.

That, of course, won't wrap, and throws the page off.

How to prevent??
 
I've got his IP/Browser version for the IIS log. He is coming in from ATT.NET. Win98/IE6. Might not always be the same IP.

Not sure why this has NEVER come up before, anywhere I can find.

Would rather know how to use vbscript to filter the uploading for his comment to SQL, but not that swift in IF...THENs. It's all done in ASP/vbscript/SQL.

Am searching for a good java enabled redirect at the moment, and the 3 I have found all seem to relate to Netscape.
 
I like that one.

in fact if you need it
-create a DB called ipDB.mdb (access)
-create one table called IP
-in the table add autonumber, IPAdd, dateHit

in the page do this
<%
dim cnn,rs
set cnn = Server.CreateObject(&quot;ADODB.Connection&quot;)
set rs = Server.CreateObject(&quot;ADODB.RecordSet&quot;) cnn.Open &quot;driver={Microsoft Access Driver (*.mdb)};;DBQ=&quot; & Server.MapPath(&quot;ipDB.mdb&quot;)
sqltext = &quot;SELECT * FROM IP&quot;
rs.Open sqltext,cnn,3,3

dim ipAddress, timeHit
ipAddress = Request.ServerVariables(&quot;remote_addr&quot;))
timeHit = Now

rs.AddNew
rs(&quot;IPAdd&quot;) = ipAddress
rs(&quot;dateHit&quot;) = timeHit
rs.update
cnn.Close
Set rs=Nothing
Set cnn=Nothing
%>

Did I miss anything

I dare to learn more
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top