There is a personal website, the browser is tupit. Tired of entering a password every time, is it possible to somehow save a cookie to the database?

  • five
    > There is a site browser tupit What? - Oleg
  • five
    Such questions sometimes that the brain just explodes! - Artem
  • In general, I want to keep cookies in the database so that I do not have to enter passwords all the time, this is such a duratic idea - bemulima
  • the idea is correct, either generate a cookie or use sessions that are also made with the help of cookies. - sercxjo

3 answers 3

Something like ($ name - the name of the cookie)

$vals = ''; $query = "INSERT INTO tablename (val1, val2) VALUES("; foreach ($_COOKIE as $name => $cookie) $vals .= "'$cookie'"; $query .= $vals.")"; 

    How are going to receive them from there? Let’s say you’ve saved them there, but you don’t have any cookies so that the server understands that these are your cookies ...

      Isn't it easier to ask for a longer cook life?