Gente, estava vendo esse artigo sobre Como criar um sistema de cadastro e login com PHP e MySQL e fiquei com dúvida em algumas coisas.
- Como que eu faço pra criar um login com nível de usuário?
Por exemplo, eu quero diferenciar a página que vai abrir no caso de usuário e moderadores.
Dúvida Em Sistema De Login Em Php
Started By Jessica-riberio, 17/09/2012, 18:11
4 replies to this topic
#1
Posted 17/09/2012, 18:11
Jéssica Ribeiro - Webdesigner
#2
Posted 18/09/2012, 10:22
A idéia é simples, porem o tutorial não cobre a idéia de include http://www.w3schools...hp_includes.asp
Imaginando que temos essa variavel na sessao do usuario basta testar e incluir o que precisa :
Abraços
Imaginando que temos essa variavel na sessao do usuario basta testar e incluir o que precisa :
if ($_SESSION['group'] == 'Admin') { include('admin.php'); }
Abraços
Procurando freelancer
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
#3
Posted 18/09/2012, 11:23
Ahh entendi, no caso então temos que fazer uma verificação de variável e depois o include da página que queremos que seja exibida para um determinado usuário né.
No caso se quisermos pegar essa variável sendo um valor do banco de dados, um flag por exemplo, pode também ?
No caso se quisermos pegar essa variável sendo um valor do banco de dados, um flag por exemplo, pode também ?
Jéssica Ribeiro - Webdesigner
#4
Posted 18/09/2012, 15:05
Pode tudo... so deixar a criatividade agir!
Abraços
Abraços
Procurando freelancer
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .
#5
Posted 19/09/2012, 11:42
Pode tudo... so deixar a criatividade agir!
Abraços
Hehehe, entendi
Muito obrigada!
Jéssica Ribeiro - Webdesigner
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)