PHP For Beginners, Ep 41 - Log In and Log Out

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 17

  • @noemichillt
    @noemichillt 9 місяців тому

    Just a small information for those who wanted to test the creation of notes at the end of this episode and got a blank page: if you deleted all users from your database in a previous episode and created a new user (id other than 1), you need to edit some files where the user_id is still hardcoded. The files are in the controllers/notes folder. Also the maximum characters of the 'body' are set to 10 in the update.php

  • @asheaven1st
    @asheaven1st Рік тому

    Thank you for continuing this series.. It is help me a lot 😢

  • @mounircoderschool
    @mounircoderschool Рік тому +1

    You doing great tutorials, thanks a lot

  • @NedumEze
    @NedumEze Рік тому

    Come on Jeff. You're amazing. You must have been sipping PHP since a thousand years.
    Thanks Buddy.
    I was at the Github repo. Struggled to relate with the scripts. Not commented.
    But, thanks Buddy.
    Deeply appreciate.

  • @kirillbaryba746
    @kirillbaryba746 Рік тому

    ❤ nice series, thanks. Maybe in the future you will records video about Symfony framework

  • @alalyrealestate1136
    @alalyrealestate1136 Рік тому

    Best tutorial ever

  • @w3cprogramming678
    @w3cprogramming678 11 місяців тому

    it will be very helpfull, to user route group, and group middileware. please create a video wtih this topic

  • @presidiun
    @presidiun Рік тому

    I have a question: Why pulling a user from the db and then verifying the password separately? Wouldn't it be more efficient if you e.g.:
    SELECT * FROM users WHERE username= variable AND password = hashed password.
    If any data is retrieved that there is a match if nothing is provided then an error msg of incorrect user-password pair has been provided. Is there a security concern doing it this way?

    • @Kevin_luz
      @Kevin_luz Рік тому

      When using the password_hash function in PHP, the resulting hashed strings include a unique salt, which is essentially random data added to the password before hashing. This salt is crucial for enhancing security by preventing attackers from using precomputed tables (rainbow tables) to crack passwords.
      Therefore, if you hash the same password using password_hash multiple times, you will get different results each time due to the inclusion of a different salt.
      To compare passwords, you should use the password_verify function. This function not only checks if the provided password matches the hashed value but also extracts the salt and cost information from the stored hash. It then uses this information to perform a comparison, ensuring that the correct salt and cost are used during the verification process.

  • @rustamergashev7278
    @rustamergashev7278 4 місяці тому

    👍

  • @NedumEze
    @NedumEze Рік тому

    Hi, Jeff, am sorry to be a bother.
    I saw this in the urlIs($value) definition in the functions.php:
    return $_SERVER['REQUEST_URI'] === $value;
    It looks like a comparison? Is it? Or should the operator be a single = ?

    • @TheofilosIntzoglou
      @TheofilosIntzoglou Рік тому +1

      It is indeed a comparison. The function returns the result of the comparison (true or false).

    • @NedumEze
      @NedumEze Рік тому

      @@TheofilosIntzoglou
      Apparently. True. I appreciate.
      I always thought that 'comparisons' take place in 'if', & similar blocks only.
      Thank you very much. Learned a little something here. I am asking myself what determines where to apply this?

  • @howuseehim
    @howuseehim Рік тому

    What happened?

  • @xcrap
    @xcrap Рік тому

    The title is a bit deceiving those should be named Laravel for beginners or PHP for Beginners in Laravel...

    • @carlmichaelfabe
      @carlmichaelfabe Рік тому

      This is not Laravel. It's in pure PHP.
      The setup for everything is in the past 40 episodes.