GOOD LATE. I'm doing a help forum on my site, and I came across a question. I tried to make sure that, when the owner of the topic was in doubt, he could close the topic himself. However, I have a certain message when trying to display the message for him to click. I've tried this:
<?php
$connect = mysql_connect('localhost','root','');
$db = mysql_select_db('registro');
$id = $_GET["id"];
$sql = "SELECT 'Autor' FROM topicos WHERE 'ID' = '$id'";
$limite = mysql_query("$sql");
if ($sql = $login_cookie ) { // o $login_cookie é minha variavel que seleciona o nome de usuário, quando ele está ativo na conta
// então, tentei comparar o nome de usuário com o nome do autor do tópico
echo "Fechar tópico";
} else {
echo "oi"; // mensagem só para certificar se funcionou
}
?>
But I did not get results.
I do not want a complete code, I just want to know how I could do it, that is, in what way I could do it.
Well, through this edition, I've been saying that this system would help me in many other functions of my forum as well. I forgot to also tell you what's going on: By placing this code, the message is displayed regardless of who is logged in. I do not know if an image should help, but I think it better show what I do: link