Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Automatyczne ustawianie daty
Ubermade
post
Post #1





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 30.11.2017
Skąd: Leszno, Poland

Ostrzeżenie: (0%)
-----


  1.  
  2. include( 'database.php' );
  3.  
  4. if( isSet( $_POST['title'] ) )
  5. {
  6. $sth = $pdo->prepare( 'INSERT INTO `postinfo` (`title`, `text`, `date`) VALUES (:title, :text, :date' );
  7. $sth->bindParam( ':author', $_POST['title'] );
  8. $sth->bindParam( ':title', $_POST['text'] );
  9. $sth->bindParam( ':date', NOW());
  10. $sth->execute();
  11. }


Co zrobić aby automatycznie insertowało mi date jako czas w którym dodałem posta?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.12.2025 - 02:01