Calendar php with login

Asked

Viewed 153 times

0

I need to make an agenda with login where I register in the system and do login.

After login, register my agenda lines in the fields lugar, pais and descrição.

I can save as many lines as I want on "my page", after making logout , someone else does login on the page and see his data and not mine.

I don’t know how to do it , save data using the id single user, and then pull the data through id tanwell.

  • 2

    What exactly do you doubt? In the table structuring part or in the programming part?

1 answer

0


Exactly as you thought, the basic structure of the database would look something like this:

[USUARIO]
id_usuario
login
senha

[LINHA] // Como chamou
id_linha
id_usuario // Correspondente a quem está cadastrando
numero
descricao
lugar
pais

When logging in, you can save the user id in the session and register it along with the line in the id_usuario field

When listing your lines you will filter by the id of the logged in user, example:

SELECT * FROM linha WHERE id_usuario = X ORDER BY descricao

I hope it helps

Hugs

  • I’m not getting it yet man :( , I try to save the id but n am getting it

Browser other questions tagged

You are not signed in. Login or sign up in order to post.