-7
while($row = mysql_fetch_assoc($result))
{
if($row['level'] = '0')
{
echo("Fundador '); //pode fazer tudo
}
if($row['level'] = '1')
{
echo('Admin'); // nao pode adicionar nem remover e/ou edit users
}
if($row['level'] = '2')
{
echo('Moderador de canais'); //n tem acesso a pagina de jogos e filmes
}
if($row['level'] = '3')
{
echo('Moderador de jogos'); // n tem acesso a pagina canais e filmes
}
if($row['level'] = '4')
{
echo('Moderador de filmes'); //n tem acesso a pagina de canais e jogos.
}
else
{
echo("Membro'); //sem permissoes p ver as paginas
}
}
Here’s the bug apparently, you open a double quote and close a single in that line:
echo("Fundador ');
and in that otherecho("Membro');
. To avoid this type of error use an IDE or text editor with Highlight, you can see a list here in addition to other php tips.– rray
Hi Rodrigo, welcome to the site. Maybe you are surprised by the negative repercussion of your question. Unfortunately, I don’t have the mental powers to tell you the reason for every vote against. But I can tell you that the lack of indentation of your code is a possible motive. Correctly indenting and using tools such as a color-coded editor are key to realizing this type of error, not only for beginners, but for any programmer. Those who denied the question must have considered that you did not make the least effort alone before asking others.
– bfavaretto
When posting a question here, it is also important to show the error message that appears to you. This makes life much easier for those who try to help you. If you don’t post the error message, those who want to help will have more work. The lack of the message, added to its minimum title, may be another reason for votes against. Try to be more specific in the title. Think that your question may help other people besides you if it is well written. Finally, it is worth a visit to our [tour] and to [help]. There you will better understand the differences of this site to the traditional forums.
– bfavaretto
And don’t forget to visit the Manual on how not to ask questions!
– Marcos Henzel