I have a company table and another employee.
Company table :
id_emp | tipo | documento | fantasia | email | celular | senha | data_cadastro | ativo
Example:
1 | pessoa juridica | 05.142.333/0001-21 | petstop caes e gatos | [email protected] | (21) 8651-0801 | MD5 | 22/11/2015 | 09:49:00 | 1
Employee table :
id_func | sexo | nome | sobrenome | funcao | celular | email | senha | ativo | data_cadastro | id_emp
Example:
1 | M | Paulo | Santos | veterinario | (21)8651-0001 | [email protected] | MD5 | 1 | 22/11/2015 | 09:49:00 | 1 | ???
Before my question, I will inform the procedure that I do to get here: On my site, the company (petstop caes and gatos) registers it. After registration, the system sends a link to the registered email ([email protected]) with the MD5 password. And, there is a link to the activation of it. When it activates, just below it, it logs in.
I made using this example here .
An employee registration form has been created, ie after logging in, it will register the employee, and after saving in the employee table, associate this with the company.