E
E
Erik21212015-11-06 16:33:23
PHP
Erik2121, 2015-11-06 16:33:23

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

2 answer(s)
M
Max, 2015-11-06
@MaxDukov

ok Google, PHP session cookies
and in the database, of course, you need to have the "author" field

V
Vyacheslav, 2015-11-06
@nskarl

if($username){
  $this->getData($username); // Выведутся данные только для пользователя
} else {
  $this->getData($username = false); // Для всех
}

funtion getData($username)
{
  this -> mySql - > select -> ... -> from ...

  if($username){
    this -> mySql - > where ('username', $username);
  }
}

Well, something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question