so my aim is to make a IF statement determine what the value of 'pbutton' and 'value is.
I have a html page that has two lists boxes, one for PropertyID and another for Location which will look in a database for that value.
ccode and ccode1 are the list boxes from html page.
This is my code for .jsp page
String pbutton=request.getParameter("ccode");
if (pbutton = 0); {
pbutton=request.getParameter("ccode1");
value = Property;
else {
pbutton=request.getParameter("ccode");
value = ID;
}
}
However, it doesnt like it, giving me this error....
An error occurred at line: 75 in the jsp file: /Assignment/find.jsp
Type mismatch: cannot convert from String to boolean
72:
73: String pbutton=request.getParameter("ccode");
74:
75: if (pbutton = 0); {
76: pbutton=request.getParameter("ccode1");
77: value = Property;
78: else {
Help appreciated, thanks.