Code:
<%
if( request.getParameters("name") == "" ) {
out.println("No Name Selected");
}
%>
ok, really basic here i'm sure. i have a form with a text field 'name'. when there is nothing in that field, i want it to trigger the above if statment.
for some reason, i can not catch "" .. the value is NOT null either because i'm sending the field.
here would be the html form:
Code:
<form method=post action=test.jsp>
name: <input type=text name=name> <input type=submit name=submit value=submit>
</form>
how can i print 'no name selected' if someone submits the form without anything in it? ( no client side stuff )
so basic hehe, .. php spoils me.