Skip to content

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

Notifications You must be signed in to change notification settings

peteee/php-guestbook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Packages

No packages published

Languages

  • PHP 69.2%
  • CSS 25.0%
  • Hack 5.8%