How to place a form

How to place a form

For the organization with visitors it is necessary to post on the website of any interaction in its pages forms for information input and sending it on the server. Let's consider - as to make it if you already have a form, ready to use, and the website for its placement.

It is required to you

  • Basic knowledge of the HTML language

Instruction

1. To post a form on the website you should have its HTML code. Forms are used for various purposes therefore HTML code options there can be almost unlimited number. Your code can look, for example, so: <form id= "" mailForm"" method= "" POST"">
Your name: <input type= "" text"" name= "" name""/> <br/>
E-mail: <input type= "" text"" name= "" email""/> </br/>
Message: <textarea name= "" mess"" rows= "" 6" of" cols= "" 20""> </textarea> <br/>
<"" to Send input type= "" submit to value= """"/>
</form> It "a feedback form" - in different variations they are almost on each website. That it was displayed in the page of the website necessary to you, it is necessary to find this page and to open its source code for editing. If you have a file of the page - it is possible to open it any text editor, for example, a standard Notepad. If you use any management system of the website, then find in its panel of administration the editor of pages and open in it the necessary page. It was necessary only to insert HTML code into the place of the page necessary to you. The code of a form should not be above the opening tag of the main body of the page - <body> and below the closing tag </body>.

2. If complete with a form there are one or several additional files, then they should be loaded on the server of your website too. Normally it is the PHP files intended for data processing arriving from a form. It is possible to load them under the FTP-protocol (File Transfer Protocol - ""file transfer protocol"") through the special program. Such programs are called FTP-clients (for example, WS FTP, Cute FTP, FlashFXP, etc.). But it is possible to make it via the file manager most of which likely is in the control panel of your hosting - it allows to download files via the browser. Surely read the text instruction to such files - it should be or in a set of files, or on the page of the website from where you received a form and files. Perhaps files require some additional setup, it should be described in the instruction.

3. Sometimes there are no files, and there is an additional code for data processing from a form which should be inserted into the same page where also a form. Usually the code is written in the PHP language (Hypertext Preprocessor - "hypertext preprocessor") and it should begin with the opening tag <? php or simply <?. You need to insert such code into the beginning of the page. Pay attention - the opening tag of this code should be the very first tag of the page, no spaces or lines before it should be. If expansion of this page - ""HTML"" or ""htm"", then it is necessary to replace it with .php.

Author: «MirrorInfo» Dream Team


Print