Jump to content

creating the searching in php


hmxa

Recommended Posts

hey guys, im new to all this php stuff.

      I have a project in this semester to create an HR contract system for the university, here are my requirements:

1. Add Contracts

2. Delete Contracts

3. Edit Contracts

4. View Contracts

5. Search Contracts

 

i have done all the 4 options but now im stuck in the 5th option. i have to use checkboxes filters for search and first and the last name fields.

 

here is my form code

<form method="post" action="searchCode.php">
First Name: 
<input name="name" type="text" id="name" />
Middle Name: 
<input name="mname" id="mname" type="text" />
Last Name: 
<input name="lname" id="lname" type="text" />
Date:
<input type="text" name="date" id="currentdate" />

<input type="checkbox" name="gender[]" value="male" />Male<br />
<input type="checkbox" name="gender[]" value="female" />Female			

<input name="desig[]" type="checkbox" value="lecturar"/>Lecturar 
<input type="checkbox" name="desig[]" value="professor" />Professor 
<input type="checkbox" name="desig[]" value="assistantProfessor" />Assistant Professor
<input type="checkbox" name="desig[]" value="associateProfessor" />Associate Professor
<input type="checkbox" name="desig[]" value="researchAssociate" />Research Associate<br />
<input type="checkbox" name="desig[]" value="advisor" />Advisor
<input type="checkbox" name="desig[]" value="HOD" </span>				  

<input name="dept[]" type="checkbox" value="Comuter Science"  />Computer Science
<input type="checkbox" name="dept[]" value="Health Informatics Unit" />Health Informatics Unit
<input name="dept[]" type="checkbox" value="Electrical Engineering" />Electrical Engineering
<input type="checkbox" name="dept[]" value="Management Sciences" />Management Sciences<br />
<input type="checkbox" name="dept[]" value="Mathamatics" />Mathamatics
<input type="checkbox" name="dept[]" value="Physics" />Physics
<input type="checkbox" name="dept[]" value="Bio Sciences" />Bio Sciences
<input type="checkbox" name="dept[]" value="Meteorology" />Meteorology
<input type="checkbox" name="dept[]" value="Architecture" />Architecture

<input name="scales[]" type="checkbox" value="sg1"  />SG-I
<input name="scales[]" type="checkbox" value="sg2"  />SG-II
<input name="scales[]" type="checkbox" value="sg3"  />SG-III
<input name="scales[]" type="checkbox" value="sg4"  />SG-IV
<input name="scales[]" type="checkbox" value="ras" />RA 
<input name="scales[]" type="checkbox" value="og1nphd" />OG-I-
<input name="scales[]" type="checkbox" value="og2nphd" />OG-II-NonPhd
<input name="scales[]" type="checkbox" value="og3nphd" />OG-III-NonPhd
<input name="scales[]" type="checkbox" value="og4nphd" />OG-IV-NonPhd
<input name="scales[]" type="checkbox" value="og2phd" />OG-II-Phd
<input name="scales[]" type="checkbox" value="og3phd" />OG-III-Phd
<input name="scales[]" type="checkbox" value="og4phd" />OG-IV-Phd</p>

 

now i cant seem to get it in my mind tht how the hell im going to do tht...shud i use ifs and elses, in tht case it can get upto 256 combinations.

 

and 1 more thing all these things are in one table....plz gyus help me


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.