Buddypress Checkbox field data
-
Hello, so I’m trying to do some coding with buddypress on my own. I’m trying to make a search function in my website where users can search for members using the data from their profiles.
For example, There are teachers and students on the website. On a page called “Find Teachers”, I want the users to be able to search for teachers using their names and the subjects they teach. A teacher adds these subjects using checkboxes on his profile.
I have created the query for the searching by name but when I tried to add searching by the checkboxes values I couldn’t understand the way Buddypress handles the checkboxes data in the database. When the teacher checks “English”, “Math” and “Substitute” from the provided choices, the data in the database appears like this:
a:3:{i:0;s:7:”English”;i:1;s:4:”Math”;i:2;s:10:”Substitute”;}Now I want to compare the data the user will insert in the search form with the data in the website but I can’t figure out the way Buddypress Encrypts the data in the database.
Is there maybe a function included with Buddypress that would encrypt the data from the form to the format in the database or perhaps decrypt the data from the database so I can compare them in a sensible way?
I really need help with this, thanks guys!
- The topic ‘Buddypress Checkbox field data’ is closed to new replies.