How to Create an HTML Form Action Page

HTML is the standard programming language used to create web pages. HTML forms are used in a variety of websites, including online email programs and e-commerce sites. Without HTML forms, website visitors would be unable to interact with the page and the Internet would be vastly different. Creating an HTML form action page is a two-part process. The form page itself declares the action where the user input data will be processed. A second page contains server-side scripts to process the data generated by the HTML form. The two pages are created in different programming languages, but the novice can easily build them using free templates from online.

Things You'll Need

  • Text editor
  • Web browser with Internet connection
Show More

Instructions

  1. Create the HTML Form

    • 1

      Locate an HTML form online that you would like to use on your website. Many are freely available. The form page will provide HTML code as well as server-side programming code, such as PHP. A common HTML form that is widely available is the contact form, which processes user input to send an email.

    • 2

      Open a text editor. Any simple text editor will do. Windows Notepad is a common free choice. The program may be launched from the "Start" menu's "Programs" folder in the "Accessories" sub-menu.

    • 3

      Create a new file.

    • 4

      Copy the HTML code for the web page form from the free template. Click at the beginning of the HTML code that begins with "<form" and drag with your mouse to the end of the code where the tag "</form>" is displayed. Press "Control-C" on the keyboard. Note the file name in the "action" field of the "form" tag, as you will need this later.

    • 5

      Click in the blank text file. Press "Control-V" on the keyboard. The HTML form is pasted into your document.

    • 6

      Save the file under any name that you desire, but use the ".html" file extension.

    Create the Form Action Page

    • 7

      Create a new text document.

    • 8

      Copy the PHP code from the template beginning with the "<?php" tag. Drag the mouse to the end of the PHP code, through the "?>" tag.

    • 9

      Paste the PHP code into the blank text file using the same process as with the HTML form.

    • 10

      Locate the email address portion of the PHP script. Edit the code with your own email address. A good template will place this at the top of the PHP code so you do not have to scroll through the document to find the relevant line.

    • 11

      Save the text document under the exact same name specified in the "<form" action field of the previous HTML form document. Keep the two files together and upload them to any web server. You have now created an HTML form and its paired action page.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured