Checking user input

From: David (auto90059_at_hushmail.com)
Date: 09/09/03


Date: Tue, 9 Sep 2003 20:56:26 +1000

I need to grab between 1 and 4 tags (the exact number will vary) from user
input within a script and then assign the tags to variables for later use in
an sql select .. from .. where .. in("$tag1", "$tag2") statement. The order
doesn't matter, but it's important that valid tags are entered - they each
must have the value "O" or "W" or "WT" or "VT". Is there a reasonably
robust way to do this?

Still on user input, I want ours to enter a date in the format YYYYMMDD. We
could potentially use a / or another char as a delimiter and strip it out
after if this makes things easier. Is it possible to check that the MM
field is between 1 and 12, or that the DD field is between 1 and 31? Can we
make sure that the string that's been entered is exactly 8 numeric
characters and otherwise conforms to our format?

Thanks,

David



Relevant Pages

  • Re: A serious question about cgi (intermediate-newbie)
    ... If so, your script ... period of time because of nested table tags. ... What I find effective is collecting log entries for an offender ... call his employer, have your favorite attorney write his employer. ...
    (comp.lang.perl.misc)
  • Re: IE , SCRIPT and innerHTML
    ... the way you are trying to alert it. ... Anyone know a solution to access the contents of the script tag in IE? ... Prototype.js was written by people who don't know javascript for people ... I need the script tags, so that i can create different field ...
    (comp.lang.javascript)
  • Re: why does this simple counter fail?
    ... Look for short tags. ... On Mar 25, 2011, at 12:36 AM, Gary Kline wrote: ... hack with no error-checking is that i have used the same script ... PHP), not a shared lock. ...
    (freebsd-questions)
  • Re: asp.net and XHTML
    ... tags, and attribute values are included in double ... Controls do not render custom attributes that are ... Any script tags rendered into the page include an appropriate type ...
    (microsoft.public.dotnet.framework.aspnet)
  • Site search script?
    ... I'm looking for a script which will search a set of text files and return ... The text files are books and short stories, ... locally and uploaded to the host server) would get around this, ... with tags okay? ...
    (alt.php)