USA2017 :: "Lesson 12." - Forms: basics, tag <form>.
I searched all day along and finally found out all I need on USA2017.
/From the "Feedback collection on USA2017.com", USA2017.com./
Forms: basics, tag <form>. Lesson 12. When a website visitor input information in fields of a form and clicks "Submit" button this information go to a server to a form-handler. In our sample form-handler is server script formdata.php. Studying server scripts is out of the HTML tutorial. But in this case HTML comes very close to server part of coding so we will get a little touch of PHP programming. Please note: PHP is server language.
When a website visitor input information in fields of a form and clicks "Submit" button this information go to a server to a form-handler.
In our sample form-handler is server script formdata.php.
There are many different methods to set up server script formdata.php. We can make script to save information into DB or/and into special text files. Also we can to send input information to email of website owner.
To set up a form we must use element <form></form>, with following attributes:
action="formdata.php" - the form-handler is specified in the form's action attribute, in our case server script formdata.php.
method="POST" - The method attribute specifies the HTTP method: GET(default) or POST to be used when submitting the forms. Use GET if the form submission is passive (like a search engine query), and without sensitive information. When you use GET, the form data will be visible in the page address. You should use POST if the form is updating data, or includes sensitive information (password). POST offers better security because the submitted data is not visible in the page address.
name="form1" - to be submitted correctly, each input field must have a name attribute. Also a form must have a name attribute to avoid mixture with other forms on the current webpage.
Codes to set into the test page:
<form action="formdata_not_ready!.php" method="POST" name="form1">
<img src="images/roosevelt.jpg" width="60" height="60" class="" style="width:60px; height:60px; float:right;" alt="Franklin D. Roosevelt, president of USA in 1935." title="Franklin D. Roosevelt, president of USA in 1935." />
<p><label>Name: <input type="text" name="name1" size="32" maxlength="32" value="Franklin D. Roosevelt" /></label></p>
<p><label>eMail: <input type="text" name="email1" size="32" maxlength="32" value="Roosevelt@usa2017.com" /></label></p>
<label for="text">Message:</label><br />
<textarea name="text" id="text" cols="64" rows="8">
Dear misters Ilya Ilf and Eugene Petrov!
Welcome to America!
I thinks you're the best journalists over the world.
I believe your visit will open America for Russians and, maybe, also for Americans.
President of USA (1932-1944),
Franklin D. Roosevelt
<input type="reset" name="reset" value="Reset..." /><input type="submit" name="submit" value="Submit!"/>
So we have placed mentioned above things on our test webpage: article_012.html
← click to view, how it looks on this website...
← download this webpage in zip archive to set on your website.
USA 2017. Search page. Search Box. :: What is search? Search is the activity of looking thoroughly in order to find something or someone. Life is searching and searching is a zest of our life. When you try to locate or discover, or try to establish the existence of something, use the search box on USA 2017.
HTML tutorial on USA 2017, main page. :: HTML is an ace of base of Internet. This HTML tutorial has been created for newcomers to let them quickly understand Internet basics. From other side, experienced users also will found some lessons to be useful. This HTML tutorial contains hundreds of HTML examples. Also there are built-in lab works to ease for users process of understanding how some opportunities are actual today.
Chess portal on USA2017. :: Chess is the best game over the world. Chess makes your brain work good and your soul feel happy. Chess is taught to children in schools around the world today. Many schools host chess clubs, and there are many scholastic tournaments specifically for children. Tournaments are held regularly in many countries, hosted by organizations such as the United States Chess Federation and the National Scholastic Chess Foundation. I don't think about chess as a sport, for me chess is an art.