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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check for blank input fields

Status
Not open for further replies.

streborr

IS-IT--Management
Jan 16, 2002
98
Two input fields on form:
Login ID and Password
When both are filled in the user is sent to a page.
I only know how to check one field:

if request.form(&quot;loginID&quot;)<> &quot;&quot; then
do stuff on new page
else
response.redirect &quot;LoginPage.asp&quot;
end if

How do I check to see if both fields are filled in?

if request.form(&quot;loginID&quot;)<> &quot;&quot; or request.form(&quot;password&quot;)<> &quot;&quot; then
do whatever
else
response.redirect &quot;LoginPage.asp&quot;
end if

doesn't work!

Thanks for any help.
 
I did it!

if request.form(&quot;loginID&quot;)= &quot;&quot; then
response.redirect &quot;loginpage.asp&quot;
elseif request.form(&quot;password&quot;)= &quot;&quot; then
response.redirect &quot;loginpage.asp&quot;
else
Do Stuff
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top