Considerations dealer guestbook php. Writing a guest book script


» » @lexGuestbook

@lex Guestbook is a free PHP guestbook script for websites. Written in PHP language, @lexGuestbook Easy to install in minutes, even beginners will find it easy to understand.

PHP guestbook A completely free script - the main condition: do not remove the copyright at the bottom of the page. PHP guestbook is installed on your server and is completely independent from any other sites. Backup a message in the PHP guestbook at your request, even every day. Automatic installation Alex Guestbook: the names of the tables in the database are written themselves.

Benefits of the script.
  • Thanks to skins, you can change the appearance of @lexGuestbook to suit the design of your website. (all skins are valid XHTML 1.0 Transitional)
  • There are about 20 languages ​​built into PHP guestbook.
  • Each country has its own flag.
  • Support for emoticons: the ability to add your own emoticons, delete, edit.
  • Character statistics are displayed: you can set the maximum number of letters in one message.
  • Internal search engine.
  • Possibility of evaluation by visitors. Score on a 10-point system.
Supported languages

Full translation.
French, English, Polish, German, Norwegian, Italian, Dutch, Slovak, Persian, Turkish.

Partial translation. Some words are still in English.
Spanish, Russian, Swedish, Czech, Croatian, Portuguese, Icelandic, Serbian, Danish.

In this tutorial we will create a guest book in PHP using AJAX. The records will be stored in a database. The table will contain the following information: sender's name, email address, IP address and date-time of the last entry. jQuery will be used (to implement AJAX). Simple anti-spam protection will also be implemented - you can post no more than one entry every 10 minutes.

Step 1: SQL

For our application to work, we need to create a table:

CREATE TABLE IF NOT EXISTS `s178_guestbook` (`id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) default "", `email` varchar(255) default "", `description` varchar(255) default "", `when` int(11) NOT NULL default "0", `ip` varchar(20) default NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Step 2: PHP

The main file will contain the following code:

guestbook.php

Guestbook Add your comment here function submitComment(e) ( var name = $("#name").val(); var email = $("#email").val(); var text = $("#text ").val(); if (name && email && text) ( $.post("guestbook.php", ( "name": name, "email": email, "text": text ), function(data) ( if (data != "1") ( $("#records_list").fadeOut(1000, function () ( $(this).html(data); $(this).fadeIn(1000); )); ) else ( $("#warning2").fadeIn(2000, function () ( $(this).fadeOut(2000); )); ) )); ) else ( $("#warning1").fadeIn(2000 , function () ( $(this).fadeOut(2000); )); ) );

Your name:
Your email:
Review:
Fill in all required fields You cannot post more than one review within 10 minutes (spam protection)






2024 gtavrl.ru.