PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
Can a person select more than one option per set of checkboxes? All of your checkboxes will result in arrays of values, which isn't incorrect, but some options, such as gender can only be one option. If only one value can be selected, remove the [] from the name property of the specific input element. If a user picks one only that value will be sent instead of multiple ones which might cause confusion when you start searching.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
social_experiment wrote:Can a person select more than one option per set of checkboxes? All of your checkboxes will result in arrays of values, which isn't incorrect, but some options, such as gender can only be one option. If only one value can be selected, remove the [] from the name property of the specific input element. If a user picks one only that value will be sent instead of multiple ones which might cause confusion when you start searching.
no tht is the problem, a person can check any checkbox. for example a person can check to see if there are any records of male AND female, and the same condition goes for the rest of the checkboxes.
hmxa wrote:no tht is the problem, a person can check any checkbox. for example a person can check to see if there are any records of male AND female, and the same condition goes for the rest of the checkboxes.
Ok. Just a question then (and this is purely for curiosity sake) Why not show all the records. IMO with search options this diverse you might as well display all the records and let the user sift through them.
Back to your original question. What would a row in this table look like? If you can give an example of the fields and a value for each one that would help
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
hmxa wrote:no tht is the problem, a person can check any checkbox. for example a person can check to see if there are any records of male AND female, and the same condition goes for the rest of the checkboxes.
Ok. Just a question then (and this is purely for curiosity sake) Why not show all the records. IMO with search options this diverse you might as well display all the records and let the user sift through them.
Back to your original question. What would a row in this table look like? If you can give an example of the fields and a value for each one that would help
well what can i say this is the university project and unfortunately i have to stick to it. if it was my own wish i would've left it ages ago...
n btw the table looks like this
id Fname Mname Lname Date gender Designation Department payscale rank
1 jhon smith simpson Jan 02 , 2011 male professor Health Informatics Unit og4phd 20
hmxa wrote:well what can i say this is the university project and unfortunately i have to stick to it. if it was my own wish i would've left it ages ago...
Lol yeah i hear you. Been involved with a few of those myself Kudos for sticking it out.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering