×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

form request.getParamteter (Help please)

form request.getParamteter (Help please)

form request.getParamteter (Help please)

(OP)


Help!!!
I can't get the if statement to execute. I submit a form and one of the values for the form is 1. I submit and it does not notice the code. What am I doing wrong.
To better understand the code, here it is.
<%String Enter=request.getParameter("answer"); %>

<% if (Enter ==  "1" ){ %>

answer is the parameter that I am bring from the form.

Thank you.
Curtis

RE: form request.getParamteter (Help please)

Hello Kurtic19

  Please try like this then you will not get any error

<% if (Enter.equals("1") ){ %>

but "Enter" is "Null" it will give null pointer exception so 1st check it like this

<% if( Enter!=null && Enter.equals("1")) {%>

ok if you had any more queries ask me at somasekhar@webveda.com

bye
soma sekhar

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close