Programs used in web-mastering
So what kind of programs do you need? Below I will give specific categories of programs with explanations of why they are needed. Raster graphics processing program one of the…

Continue reading →

Web design and font size selection for the site
Too small font of the main text used on the site can become one of the factors of pessimization of this site in search results, because today search engines pay…

Continue reading →

Golden ratio in website design
A key indicator of web design quality is how natural and easy it is for users to perceive. When creating the visual design of the site, it is important to…

Continue reading →

Interactivity! What? And How?

Initially, there was a network, then e-mail appeared, and people began to correspond. They wanted to tell about themselves, share information – the World Wide Web (WWW) appeared. But static pages are just static pages … and then interactivity appeared!

First, let’s define the terminology. By interactive pages, I mean those that implement an interface with some program running on the server side. The form on the web page receives some data from the user, and the browser passes it to the web server, which launches the desired program. After the request has completed, the program returns the result to the web server, and it forms an HTML page on the fly and sends it back to the browser.

So what can we do using interactivity? The most famous thing that comes to mind is counters, guest books, forwarders, online stores, and database interfaces. In practice, anything can be done. It all depends on the skill of the programmer.

How is this done technically? And here’s how – on the server side, we place the necessary programs, databases, .. and configure the web server so that it can transfer user requests from the network to the processing program and get the result from it. This is done through the CGI protocol – Common Gateway Interface (which in Russian sounds like a “common gateway interface”). CGI is a set of rules by which a server passes a request to a program. Any program written in such a way as to satisfy these requirements can be used on a Web server.

The programming language in which the program is written does not matter much, and anyone can be used. The most popular programming language used to write simple programs is PERL, a language originally developed for writing reports and ideally suited for simple CGI programs. PERL language text is usually called a script (not to be confused with JavaScript – the PERL program runs on the server side, while JavaScript on the client side). The language is interpretive, that is, analyzing the text of the program during execution. For PERL to work on the web server, the appropriate interpreter must be installed and configured correctly.

Thus, interactive pages can be divided into two parts: form and program. In the form, we need to correctly describe all the elements of the interface and indicate the path to the program being executed. As you can see, everything is not so complicated. But what if you are not a programmer, but you need a simple program? In this case, you can use the archive of ready-made scripts, most of which are free. All typical tasks have long been resolved and debugged. These are guest books, counters, mailing lists, etc. You just need to find the right one and carefully read the description for it. After that, it remains only to correctly place the elements in the form and specify specific parameters for this script. More complex programs already have to be written by programmers with sufficient experience to do this.

Email form
Let’s look at a typical example – sending a form by mail. To do this, we will use the ready-made program from the Matt Wright archive, designed to send the contents of the form by mail – FormMail. This script needs to be configured and placed on the web server in a special directory where the CGI programs are located. Usually it is called cgi-bin (for confidence, consult with your provider – does it provide services for hosting CGI scripts, and what is the name of the directory for hosting scripts). And on the page – describe the form. Thus, we need to prepare two files: create an HTML form and configure a Perl script for our needs.

Form creation
Let’s start with the form. The description of the form will be between the <form> and </form> tags and contain the form elements inside. We will make the most minimalist version of the form sender, which will contain the following fields: name, email address, message text. The HTML code of our page is as follows:

<html>
<head> <title> Email form </title> </head>
<body>

<form name = “Request” action = “/ cgi-bin / formmail.pl” method = “post”>
<input type = hidden name = “recipient” value = “yourmail@domain.com”>
<input type = hidden name = “subject” value = “Request for information”>
Your Name: <br>
<input type = text name = “Name”> <br>
Email: <br>
<input type = text name = “E-mail”> <br>
Message: <br>
<textarea name = “Message”> </textarea> <br> <br>
<input type = submit value = “Send”>
<input type = reset value = “Clear”>
</form>

</body>
</html>
A bit of clarification on the above code. Pay attention to the action parameter in the <form> tag – it defines the address of our script (.pl is the standard extension for programs written in PERL). The first elements in the form are special hidden fields for transmitting information to the script: the recipient field defines the e-mail to which we want to send the contents of the form.

The browsers we choose
Now let's talk about browsers. And what to say about them, you say, and so everything is clear - this is the program with which we look at Web pages.…

...

Trends in the design of email newsletters in 2020
Despite the fact that email marketing has existed for decades, it still remains an actual trend in Internet marketing in 2020 and a popular way to promote services online. The…

...

Trends in the design of email newsletters in 2020
Despite the fact that email marketing has existed for decades, it still remains an actual trend in Internet marketing in 2020 and a popular way to promote services online. The…

...

Golden ratio in website design
A key indicator of web design quality is how natural and easy it is for users to perceive. When creating the visual design of the site, it is important to…

...