Hi, guys. I'm trying to make a site for employers and workers to register and be able to find each other. I'm running the site on my local server in WAMP right now.
I have built the registration forms using the Ninja Forms plugin, and am now trying to set up a search function loop, where a MySQL query is formulated based on whether the user is looking for workers or employers, and is logged on or not, then the output is displayed in a table.
I know how to do all this in vanilla procedural PHP/MySQL, but am new to Wordpress and don't know where to begin here.
I've found the table that the forms save data to in PHP MyAdmin, and all the user data from each registration is dumped into one field of a new row as an array. For instance, here are entries for an employer and employee.
Employer:
'a:13:{i:0;a:2:{s:8:"field_id";i:1;s:10:"user_value";s:3:"Bob";}i:1;a:2:{s:8:"field_id";i:2;s:10:"user_value";s:5:"Jones";}i:2;a:2:{s:8:"field_id";i:3;s:10:"user_value";s:10:"1 Jones St";}i:3;a:2:{s:8:"field_id";i:4;s:10:"user_value";s:10:"Jonesville";}i:4;a:2:{s:8:"field_id";i:5;s:10:"user_value";s:5:"99191";}i:5;a:2:{s:8:"field_id";i:6;s:10:"user_value";s:2:"US";}i:6;a:2:{s:8:"field_id";i:7;s:10:"user_value";s:21:"bobjones@fakemail.com";}i:7;a:2:{s:8:"field_id";i:9;s:10:"user_value";s:14:"(555) 555-5555";}i:8;a:2:{s:8:"field_id";i:11;s:10:"user_value";s:10:"11/11/1911";}i:9;a:2:{s:8:"field_id";i:12;s:10:"user_value";s:2:"AF";}i:10;a:2:{s:8:"field_id";i:13;s:10:"user_value";s:2:"na";}i:11;a:2:{s:8:"field_id";i:28;s:10:"user_value";s:6:"Center";}i:12;a:2:{s:8:"field_id";i:29;s:10:"user_value";s:1:"5";}}
Employee:
a:13:{i:0;a:2:{s:8:"field_id";i:1;s:10:"user_value";s:3:"Bob";}i:1;a:2:{s:8:"field_id";i:2;s:10:"user_value";s:5:"Jones";}i:2;a:2:{s:8:"field_id";i:3;s:10:"user_value";s:10:"1 Jones St";}i:3;a:2:{s:8:"field_id";i:4;s:10:"user_value";s:10:"Jonesville";}i:4;a:2:{s:8:"field_id";i:5;s:10:"user_value";s:5:"99191";}i:5;a:2:{s:8:"field_id";i:6;s:10:"user_value";s:2:"US";}i:6;a:2:{s:8:"field_id";i:7;s:10:"user_value";s:21:"bobjones@fakemail.com";}i:7;a:2:{s:8:"field_id";i:9;s:10:"user_value";s:14:"(555) 555-5555";}i:8;a:2:{s:8:"field_id";i:11;s:10:"user_value";s:10:"11/11/1911";}i:9;a:2:{s:8:"field_id";i:12;s:10:"user_value";s:2:"AF";}i:10;a:2:{s:8:"field_id";i:13;s:10:"user_value";s:2:"na";}i:11;a:2:{s:8:"field_id";i:28;s:10:"user_value";s:6:"Center";}i:12;a:2:{s:8:"field_id";i:29;s:10:"user_value";s:1:"5";}}
I guess I could make the registration all on one page, and just let the user pick whether they are an employee or employer in the first form, then set up a PHP function to query the DB, loop through the output, and for each array that is returned where the first element is of the proper type, loop through the rest of it, outputting it as a table. This seems a bit...loopy, though. Perhaps there is a better free plugin that lets me make forms and directly determine which table and field they post to?
Also, how do I even access the source code for something like this? I tried to do so in the Appearance-Editor on cPanel, but no joy.
Thanks for your help,
Boris