[thelist] Possible Bug Form Validation ASP

Rob Smith rob.smith at THERMON.com
Wed Feb 23 12:37:14 CST 2005


<snip author="Matt Warden">
  So, you are saying that the code you posted works, but the following does
not?
 
  <%
   if not request.form("submit") = "" then
     ...
   end if
  %>
  <html>
  <form method="post" action="add.asp"></form>
  </html>
</snip>

That's correct. I even set up a <%="Hello?"%> inside the first test there.
No dice.

<tip type="Mixing Textareas and Method=get">
Don't do it. request.querysting("textarea_name") (and possibly
$_get["textarea_name"]) only retrieves the first line of material. Use
method="post" instead of method="get" when retrieving that info.

Just spent 10 minutes figuring out why an update query wasn't working when
using request.querystring("comments") and textareas. It knew that there was
more, but the information was truncated, along with the null end terminating
character. I hope that made sense. 

...unless someone can prove me wrong.
</tip>

Rob


More information about the thelist mailing list