Answer the question
In order to leave comments, you need to log in
How to make an account on the site?
Hello, I would like to ask, after the user has logged in, it is necessary that only its content be displayed on the page, for example, I have a table <table></table>
and buttons for editing the table on the page (Add, Delete, Edit) I have a general table displayed through which login I wouldn’t log in, but how to make it so that when I log in through a certain login, I get exactly his table with the data that a certain user entered there. It's like VKontakte in the likeness of your page, please tell me, thanks in advance.
Answer the question
In order to leave comments, you need to log in
ok Google, PHP session cookies
and in the database, of course, you need to have the "author" field
if($username){
$this->getData($username); // Выведутся данные только для пользователя
} else {
$this->getData($username = false); // Для всех
}
funtion getData($username)
{
this -> mySql - > select -> ... -> from ...
if($username){
this -> mySql - > where ('username', $username);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question