Link to home
Start Free TrialLog in
Avatar of neks
neks

asked on

SQL Query the "AND" Statement - urgent

Hello :)
I have been struggling for the past 3 days to get the "and" statement to work, There is no errors in the actual program, but it is not returning the record/records. And I have made sure that the fields i am calling are present in the Access database. Where am I going wrong? Do I need an IF Statement. when i use the OR statement it works,  but i want the "hobbyname", "sex" and "coursename" values to met entirely. Please, please can you help :(

<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.Statement statement = connection.createStatement();
java.sql.ResultSet RS = statement.executeQuery
("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE HobbyName=? AND Sex=? AND CourseName=?");
%>
Avatar of allahabad
allahabad

Looks like, You have case problem, pass the value in either lower case or upper case.

For ex. if you want to compare with lower case.

statement.setString(1,hobbyNameValue.toLowerCase());
statement.setString(2,sexValue.toLowerCase());
statement.setString(3,courseNameValue.toLowerCase());

java.sql.ResultSet RS = statement.executeQuery
("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE lower(HobbyName)=? AND lower(Sex)=? AND lower(CourseName)=?");
Avatar of neks

ASKER

Thanx for replying,
I have actually tried both uppercase and lowercase, and it is coming up with 3 errors saying......."
"HobbyNameValue" is either a misplaced package name or a non-existent entity. etc.

It might be me, maybe im  coding it in the wrong place. I placed it like this...


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.Statement statement = connection.createStatement();
statement.setString(1,HobbyNameValue.toUpperCase());
statement.setString(2,SexValue.toUpperCase());
statement.setString(3,CourseNameValue.toUpperCase());
java.sql.ResultSet RS = statement.executeQuery
("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE upper HobbyName=? AND upper Sex=? AND upper CourseName=?");

Avatar of Mick Barry
You are not using a prepared statement (in fact I'm not sure how the above code even compiles). Try this:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE upper HobbyName=? AND upper Sex=? AND upper CourseName=?");
statement.setString(1,HobbyNameValue.toUpperCase());
statement.setString(2,SexValue.toUpperCase());
statement.setString(3,CourseNameValue.toUpperCase());
java.sql.ResultSet RS = statement.execute();



Avatar of neks

ASKER

I pasted the wrong code previously, I did use the Prepared Statement, everything seems right in the sql query, but an error comes up now saying.......

Syntax error (missing operator) in query expression 'Upper HobbyName=? AND upper Sex=? AND upper CourseName=?'.

This is how my code stands at the moment;

<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE Upper HobbyName=? AND upper Sex=? AND upper CourseName=?");
statement.setString(1,"HobbyNameValue".toUpperCase());
statement.setString(2,"SexValue".toUpperCase());
statement.setString(3,"CourseNameValue".toUpperCase());
java.sql.ResultSet RS = statement.executeQuery();

so, again where is the problem? Searchinng a database is supposed to be one of the easiest things to do, but this doesnt seem to be the case:(
P.S The last line thats executes it needs to contain the word query or that comes up with an error. Please help!!!
should be something like this:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE HobbyName=? AND Sex=? AND CourseName=?");
statement.setString(1,hobby);
statement.setString(2,sex);
statement.setString(3,course);
java.sql.ResultSet RS = statement.executeQuery();

Little modification , since you are comparing with upper case values.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE upper HobbyName=? AND upper Sex=? AND upper CourseName=?");
// here hobby,sex,coures are Java String variables.
statement.setString(1,hobby.toUpperCase());
statement.setString(2,sex.UpperCase());
statement.setString(3,course.toUpperCase());
java.sql.ResultSet RS = statement.executeQuery();
Little modification , since you are comparing with upper case values.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE upper HobbyName=? AND upper Sex=? AND upper CourseName=?");
// here hobby,sex,coures are Java String variables.
statement.setString(1,hobby.toUpperCase());
statement.setString(2,sex.toUpperCase());
statement.setString(3,course.toUpperCase());
java.sql.ResultSet RS = statement.executeQuery();
have you run the query in Access to confirm that some records actually match your query?
Avatar of neks

ASKER

I pasted the wrong code previously, I did use the Prepared Statement, everything seems right in the sql query, but an error comes up now saying.......

Syntax error (missing operator) in query expression 'Upper HobbyName=? AND upper Sex=? AND upper CourseName=?'.

This is how my code stands at the moment;

<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE Upper HobbyName=? AND upper Sex=? AND upper CourseName=?");
statement.setString(1,"HobbyNameValue".toUpperCase());
statement.setString(2,"SexValue".toUpperCase());
statement.setString(3,"CourseNameValue".toUpperCase());
java.sql.ResultSet RS = statement.executeQuery();

so, again where is the problem? Searchinng a database is supposed to be one of the easiest things to do, but this doesnt seem to be the case:(
P.S The last line thats executes it needs to contain the word query or that comes up with an error. Please help!!!
Access does not distinguish between upper and lower case .

So remove Upper from the code.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE HobbyName=? AND Sex=? AND CourseName=?");
// here hobby,sex,coures are Java String variables.
statement.setString(1,hobby);
statement.setString(2,sex);
statement.setString(3,course);
java.sql.ResultSet RS = statement.executeQuery();
> So remove Upper from the code.

Didn't you just tell neks to add it :)

That code is also identical to what I already posted.

I just came to know that Access does not distinguish between upper and lower case ,when neks posted Syntax error (missing operator) in query expression 'Upper HobbyName=? AND upper Sex=? AND upper CourseName=?'.

Yes, i did to help him.  I could have also said look to for the posting of objets. My mistake Mr. objects.
> when neks posted Syntax error (missing operator) in
> query expression 'Upper HobbyName=? AND upper Sex=? AND upper CourseName=?'.

He actually posted that before your comment, but u may have missed it :)

Comment from neks  03/15/2003 04:56PM PST  

Yes, you are right, I missed "Comment from neks  03/15/2003 04:56PM PST".
Avatar of neks

ASKER

yes I have checked numerous amounts of time that the 3 searches that i use are being satisfied in the Access database. None of the suggessted codes work
Firstly; none of the codes posted use( request.getParameter), so I am baffled has in to how the program is supposed to bring up the fields requested. It does not recognise
1)statement.setString(1,hobby);
neither does it recognise.... this method
statement.setString(1,hobby.toUpperCase());
(they both come with errors specifying that the package/method is unknown)

it however recognises the way i implement it and runs...
statement.setString(1,request.getParameter("HobbyName"));
however the specfied record does not show up, as i said when I use the OR statement it works... how weird!!do you suggest that I use an IF statement?!?
Avatar of neks

ASKER

dear objects and allahabad,
I am actually female ;)
Avatar of neks

ASKER

dear objects and allahabad,
I am actually female ;)
Avatar of neks

ASKER

dear objects and allahabad,
I am actually female ;)
> I am actually female ;)

My apologies, i generally try not to be gender specific but occasionally I slip up. Again please accept my apologies.

> none of the codes posted use( request.getParameter),

Well u never stated where the query parameters were coming from so we could only post generic code :)

> 1)statement.setString(1,hobby);

Here hobby is assumed to be a string variable containing the value of your request parameter.
So yes you should replace it with request.getParameter("HobbyName"). Same for the other query parameters.

> however the specfied record does not show up

Check the values of your request parameter.
Also what are the types of the columns in the database?
Avatar of neks

ASKER

sorry for repeating myself 3 times, I am a new user and not very familiar with the way this site works.
i shall check for any new code posted tomorrow, as it is 3am here in London.
Thank you..
neks
Avatar of neks

ASKER

In the Access database the 3 fields are all declared as text, thus I used "String", could it be the seetings in my design view in access? Bcos where it says "required data entry in the field", they are all set to "no", but I dont think that is the problem.
No, that shouldn't create a problem.

Perhaps try trimming the parameters:

System.out.println(request.getParameter("HobbyName"));
System.out.println(request.getParameter("Sex"));
System.out.println(request.getParameter("CourseName"));

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
java.sql.PreparedStatement statement = connection.prepareStatement ("SELECT FirstName,LastName,HobbyName,Sex,CourseName FROM Student WHERE HobbyName=? AND Sex=? AND CourseName=?");
statement.setString(1,request.getParameter("HobbyName").trim());
statement.setString(2,request.getParameter("Sex").trim());
statement.setString(3,request.getParameter("CourseName").trim());
java.sql.ResultSet RS = statement.executeQuery();



Avatar of neks

ASKER

Nope,
trimming the parameters brings up an error saying null pointer exception.

any more suggestions...
Avatar of neks

ASKER

hi,
this is how my code stands right now.... and it still isnt running.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
     String sql = ""
     + " SELECT FirstName, LastName, Age, CourseName, Sex"
     + " FROM Student"
     + " WHERE Age = ?"
     + " OR CourseName = ?"
     + " OR Sex = ?"
;
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1,request.getParameter("FirstName"));
statement.setString(2,request.getParameter("LastName"));
statement.setString(3,request.getParameter("Age"));
statement.setString(4,request.getParameter("CourseName"));
statement.setString(5,request.getParameter("Sex"));
ResultSet RS = statement.executeQuery();

while(RS.next()) {
String Age = RS.getString(3);
String CourseName = RS.getString(4);
String Sex = RS.getString(5);  
%>
<table BORDER WIDTH="100%" >
<tr>
     <td><b>First Name</b></td>
     <td><b>Surname</b></td>
     <td><b>Age</b></td>
     <td><b>Course</b></td>
     <td><b>Gender</b></td>
</tr>
<%

     }
     RS.close();
connection.close();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
    String sql = ""
    + " SELECT FirstName, LastName, Age, CourseName, Sex"
    + " FROM Student"
    + " WHERE Age = ?"
    + " OR CourseName = ?"
    + " OR Sex = ?"
;
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(3,request.getParameter("Age"));
statement.setString(4,request.getParameter("CourseName"));
statement.setString(5,request.getParameter("Sex"));
ResultSet RS = statement.executeQuery();

<table BORDER WIDTH="100%" >
<tr>
    <td><b>First Name</b></td>
    <td><b>Surname</b></td>
    <td><b>Age</b></td>
    <td><b>Course</b></td>
    <td><b>Gender</b></td>
</tr>
while(RS.next()) {
String firstName = RS.getString(1);
String lastName = RS.getString(2);
String Age = RS.getString(3);
String CourseName = RS.getString(4);
String Sex = RS.getString(5);  
%>
<table BORDER WIDTH="100%" >
<tr>
    <td><%= firstName %></td>
    <td><%= lastName %></td>
    <td><%= Age %></td>
    <td><%= CourseName %></td>
    <td><%= Sex %></td>
</tr>
<%

    }
    RS.close();
connection.close();


Make sure your request Paremter name (Age,CourseName,Sex) are correct
in case also.
There was little mistake in setString.
try this:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
    String sql = ""
    + " SELECT FirstName, LastName, Age, CourseName, Sex"
    + " FROM Student"
    + " WHERE Age = ?"
    + " OR CourseName = ?"
    + " OR Sex = ?"
;
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1,request.getParameter("Age"));
statement.setString(2,request.getParameter("CourseName"));
statement.setString(3,request.getParameter("Sex"));
ResultSet RS = statement.executeQuery();

<table BORDER WIDTH="100%" >
<tr>
    <td><b>First Name</b></td>
    <td><b>Surname</b></td>
    <td><b>Age</b></td>
    <td><b>Course</b></td>
    <td><b>Gender</b></td>
</tr>
while(RS.next()) {
String firstName = RS.getString(1);
String lastName = RS.getString(1);
String Age = RS.getString(3);
String CourseName = RS.getString(4);
String Sex = RS.getString(5);  
%>
<table BORDER WIDTH="100%" >
<tr>
    <td><%= firstName %></td>
    <td><%= lastName %></td>
    <td><%= Age %></td>
    <td><%= CourseName %></td>
    <td><%= Sex %></td>
</tr>
<%

    }
    RS.close();
connection.close();


Make sure your request Paremter name (Age,CourseName,Sex) are correct
in case also.
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
    String sql = ""
    + " SELECT FirstName, LastName, Age, CourseName, Sex"
    + " FROM Student"
    + " WHERE Age = ?"
    + " OR CourseName = ?"
    + " OR Sex = ?"
;
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1,request.getParameter("Age"));
statement.setString(2,request.getParameter("CourseName"));
statement.setString(3,request.getParameter("Sex"));
ResultSet RS = statement.executeQuery();
%>

<table BORDER WIDTH="100%" >
<tr>
    <td><b>First Name</b></td>
    <td><b>Surname</b></td>
    <td><b>Age</b></td>
    <td><b>Course</b></td>
    <td><b>Gender</b></td>
</tr>
<%
while(RS.next()) {
String firstName = RS.getString(1);
String lastName = RS.getString(1);
String Age = RS.getString(3);
String CourseName = RS.getString(4);
String Sex = RS.getString(5);  
%>

<tr>
    <td><%= firstName %></td>
    <td><%= lastName %></td>
    <td><%= Age %></td>
    <td><%= CourseName %></td>
    <td><%= Sex %></td>
</tr>
<%

    }
%>
</table>
<%
    RS.close();

connection.close();
%>

Make sure your request Paremter name (Age,CourseName,Sex) are correct
in case also.

If this does not work, could you post us error message of the page.
<%@ page import="java.sql.*" %>
// make sure imported required classes
<%
try {
   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
    String sql = ""
    + " SELECT FirstName, LastName, Age, CourseName, Sex"
    + " FROM Student"
    + " WHERE Age = ?"
    + " OR CourseName = ?"
    + " OR Sex = ?"
;
java.sql.PreparedStatement statement = connection.prepareStatement(sql);
statement.setString(1,request.getParameter("Age"));
statement.setString(2,request.getParameter("CourseName"));
statement.setString(3,request.getParameter("Sex"));
ResultSet RS = statement.executeQuery();
%>

<table BORDER WIDTH="100%" >
<tr>
    <td><b>First Name</b></td>
    <td><b>Surname</b></td>
    <td><b>Age</b></td>
    <td><b>Course</b></td>
    <td><b>Gender</b></td>
</tr>
<%
while(RS.next()) {
String firstName = RS.getString(1);
String lastName = RS.getString(1);
String Age = RS.getString(3);
String CourseName = RS.getString(4);
String Sex = RS.getString(5);  
%>

<tr>
    <td><%= firstName %></td>
    <td><%= lastName %></td>
    <td><%= Age %></td>
    <td><%= CourseName %></td>
    <td><%= Sex %></td>
</tr>
<%

    }
%>
</table>
<%
    RS.close();

connection.close();
}
catch (Exception e){

   out.println(e.getMessage());
}
%>

> trimming the parameters brings up an error saying null pointer exception.

Then the problem is that one of the request parameters is not set. ie. it is null.

Check that you arfe passing the request parameters correctly.
insted of using Statement use preparedStatement and set the value for each "?" using setInt(), setString()..related functions.
Avatar of neks

ASKER

To allahabad, the code seems fine, no errors, but does not bring up the record. If I change the "AND" to "OR", it then lists all the females or males in the database. depending on which gender I have specfied. Obviously this is not what I want to achieve, thus there cant be anything wrong with the actual Access database. I have run out of ideas on what could be wrong with it.

To Objects, the request parameters are right, I have checked them over several times :(

To umangioshi, would you like to elaborate on what your saying, by using my code that I have pasted thanx :)
i feel Age field could be giving problem  in AND condition.  So pass Age as Int .

<%@ page import="java.sql.*" %>
            // make sure imported required classes
<%
            try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Student_db","","");
               String sql = ""
               + " SELECT FirstName, LastName, Age, CourseName, Sex"
               + " FROM Student " 
               + "  WHERE Age = ?"
               + "  AND CourseName = ?"
               + "  AND Sex = ?"
            ;
            java.sql.PreparedStatement statement = connection.prepareStatement(sql);
            statement.setInt(1,Integer.parseInt(request.getParameter("Age")));
            statement.setString(2,request.getParameter("CourseName"));
            statement.setString(3,request.getParameter("Sex"));
            ResultSet RS = statement.executeQuery();
   %>

            <table BORDER WIDTH="100%" >
            <tr>
               <td><b>First Name</b></td>
               <td><b>Surname</b></td>
               <td><b>Age</b></td>
               <td><b>Course</b></td>
               <td><b>Gender</b></td>
            </tr>
            <%
            while(RS.next()) {
            String firstName = RS.getString(1);
            String lastName = RS.getString(1);
            String Age = RS.getString(3);
            String CourseName = RS.getString(4);
            String Sex = RS.getString(5);  
            %>

            <tr>
               <td><%= firstName %></td>
               <td><%= lastName %></td>
               <td><%= Age %></td>
               <td><%= CourseName %></td>
               <td><%= Sex %></td>
            </tr>
            <%

               }
            %>
            </table>
            <%
               RS.close();

            connection.close();
            }
            catch (Exception e){

              out.println(e.getMessage());
            }
            %>
> To Objects, the request parameters are right, I have checked them over several times :(

How have you checked them?
If one of the following lines is causing an NPE, then the request parameter must be null.

statement.setString(1,request.getParameter("HobbyName").trim());
statement.setString(2,request.getParameter("Sex").trim());
statement.setString(3,request.getParameter("CourseName").trim());


I agree with 'objects'. Please check all your request parameters values and their length; this will help you to debug your problem, since you are very near to it.
Put these lines just below the try block and before JDBC class loading lines to see actually what are you getting from calling jsp.
   
     out.println("Value of Age  " +request.getParameter("Age"));
     out.println("Length of Age  " +request.getParameter("Age").length());
     out.println("Value of CourseName  " +request.getParameter("CourseName"));
     out.println("Length of CourseName  " +request.getParameter("CourseName").length());

    // looks like you are geting value of 'Sex' correct, but still just print it for your information.
     out.println("Value of Sex  " +request.getParameter(Sex"));
     out.println("Length of Sex  " +request.getParameter("Sex").length());

If you are  getting additional black spaces(in start or last), you can use 'objects' posting to trim those blank spaces, before   passing  those to sql where condition.
Yes, I suggested earlier printing out the request values :)
Avatar of neks

ASKER

yes,
there are null values present. In Age, and in HobbyName.
In HobbyName when the program runs it just says.....

"Value of HobbyName null null", i do not know much jsp, so how do i rectify this problem... I have no idea.
Check the page that is calling it is setting/passing the parameters correctly.
Avatar of neks

ASKER

Guess what? I think I know where my problem is. I didnt actually show any of you (allahabad and objects), where I was calling the page from. I havent set the Parameters on this page to retreive "HobbyName", "CourseName", and "Sex", this is the file (below). I am not sure how to either, so I'll experiment, with it whilst I wait for your professional advice :)
This is where I search from, and it calls the page that we have been working on... I hope this helps to find out where Ive been going wrong.

<font size="5" color="#003366"><b>Student  - Search </b></font>
<form name="HobbySearch" method="Post" action="Three2.jsp">
<table border="0" cols="2" width="75%" >
<tr>
       <td width="25%"><b>Search by Hobby:</b></td>
     <td>
          <select name="HobbyName">
               <option>     </option>
               <option>Basketball</option>
               <option>Cooking</option>
               <option>Dancing</option>
               <option>Football</option>
               <option>Golf</option>
               <option>Horse riding</option>
               <option>Music</option>
               <option>NetBall</option>
               <option>StampCollecting</option>
               <option>Swimming</option>
          </select>
         
     </td>
</tr>
</table>
</form>
<form name="CourseSearch" method="Post" action="Three2.jsp">
<table border="0" cols="2" width="75%" >
<tr>
       <td width="25%"><b>Search by Course:</b></td>
     <td>
       <select name="CourseName">
       <option>          </option>
       <option>Aerospace</option>
       <option>Architecture</option>
       <option>Art</option>
       <option>Applied Science</option>
       <option>Biology</option>
       <option>Business</option>
       <option>Chemistry</option>
       <option>Computer Science</option>
       <option>Digital Media Studies</option>
       <option>English</option>
       <option>Economics</option>
       <option>French</option>
       <option>Geography</option>
       <option>GIS</option>
       <option>History</option>
       <option>Information Technology</option>
       <option>Law</option>
       <option>Mathematics</option>
       <option>Music</option>
       <option>Pharamacutical Science</option>
       <option>Religious Studies</option>
       <option>Sociology</option>
       <option>Spanish</option>
       <option>Sport Science</option>
       </select>
     </td>
</tr>
</table>
</form>
<form name="SexSearch" method="Post" action="Three2.jsp">
<table border="0" cols="2" width="75%" >
</tr>
<td width="28%">Sex:</td>
     <td width="72%">
       <input type="radio" name="Sex" value="Female" checked>
       Female
       <input type="radio" name="Sex" value="Male">
       Male</td>
    </tr>
    <tr>
         

</td>
</tr>
</table>
<input type="submit" name="Search" value="Search">
</form>
Avatar of neks

ASKER

Thanx objects, Ive only seen your reply now :)
ASKER CERTIFIED SOLUTION
Avatar of allahabad
allahabad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of neks

ASKER

ITS WORKED!!!!
THANK YOU SO MUCH. YOU HAVE MADE MY DAY ALLAHABD :) THANK YOU A MILLION.

P.S HOW DO I GRADE YOU

P.S I HAVE TO ALSO PERSONALLY THANK OBJECTS. YOU WERE SUCH A GREAT HELP TOO

THANK YOU BOTH, FOR GOING OUT YOUR WAY TO HELP ME. PLEASE LET ME KNOW HOW TO GRADE YOU BOTH.
Avatar of neks

ASKER

As i said previously you were great. you responded to all my problems, and if i had used my brain, i would have sent my other page sooner, in order for you to have sussed it out.again Thank you so much, I am truly grateful.

neks xxx
You are welcome. I think you can post it 'Community Service' section to give points for 'objects'.
Avatar of neks

ASKER

> To objects

please let me know how to give you points even though i posted allahabad's comment as an answer, how can I award you points and grade you as well. I have 25 points left in my account so if i need to give you those cos Ive already processed my question i truly dont mind. Please please let me know

neksxx
That's ok, keep your points for another question :-)