Skip to content

Files

Latest commit

538e6b9 · Apr 27, 2023

History

History
34 lines (28 loc) · 946 Bytes

README.md

File metadata and controls

34 lines (28 loc) · 946 Bytes

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