/php-guestbook

PHP Guestbook script - Read/Write using a TEXT file and send emails directly.

Primary LanguagePHP

PHP-Guestbook

PHP Guestbook script - Read/Write using a TEXT file and send emails directly*.

*see section "Email sending"

OVERHAULED!

  • uses JS's fetch() (asynchronous calls)
  • new CSS!
  • supports Emoji
  • HTML form validation
  • uses preloader CSS animation
  • added minimal security checks: strip_tags, isset etc.

- auto-refreshes / -updates the posts

-> add this to index.php if you need auto-refresh

this example would update the posts every 5 seconds...

setInterval(() => {
updateDate();
gbTextFile = "gbentries.txt?v="+h+m+s;
fetch(gbTextFile)
.then(response => response.text())
.then((data) => {
gbContainer.innerHTML = data;
})
}, 5000);

Email sending

  • deactivated for now... but can be reanabled by uncommenting in gb.php

DEMO