It's not too stupid a question. The problem with it is that the answer varies depending on the language you want to use.
It could be done on the server side, using ASP or PHP or .NET or even CGI or Perl. It can also be done using Javascript on the client side.
The reason you can't find a formula is because there is no set formula. It's going to depend on your form and the type of validation you want.
For example, in ASP your form validation might look something like this:
Code:
Dim Some_Field
Some_Field = Request.Form ("Some_Field")
if Some_Field = "" or IsNull (Some_Field) then
Response.Write "
You left Some_Field blank, jackass.</p>"
end if
Alternatively, in Javascript you might end up with something like this:
Code:
var Some_Field = document.Some_Form.Some_Field.value;
if (Some_Tield == '') {
alert ("You didn't fill out Some_Field, dummy!");
}
This is more of an application question than a syntax question, so you're not likely to get an answer in general terms.