How To Implement Various Input Type And Input Button on PHP Form Creation

in #utopian-io8 years ago (edited)

What Will I Learn?

  • you will learn how to add input field on your php form
  • You will learn how to know more input modes in PHP
  • You will learn how to create dynamic form

Requirements

  • you must understad basic of PHP programming
  • you must understand how to put the input layout well
  • you should know the function of each type of input button you want to create

Difficulty

  • Basic

Tutorial Contents

on this occasion I will give tutorial how to make various types of input on PHP-HTML programming. many types of input what is like text input, input type text area, type input password, type input text, option button, radio button and others. we will directly create one by one the types of input.

TEXT INPUT TYPE

  • first we will create a text input type or text input.
  • Type the code below and see my explanation below.
  <body>
     <form action="" method="post">
        Name : <input name="name" type="text" />
     </form>
  </body>
  • above is a script to create a text box input area.

<form action="" method="post">this is the section for method declarations
Name : <input name="name" type="text" /> and this is the declaration of the input type we want to create, this is for the text input type.

the output is as below:

image.png

TEXT AREA

  • then we will create a text input area, the difference with the text input is the text area has a box larger than the first input type earlier
  • type the script below to create a text input area.
<html>
  <body>
     <form action="" method="post">
        addres :<textarea name="alamat" rows="7" col="150"></textarea>
     </form>
  </body>
</html>

<textarea name="alamat" rows="7" col="150"></textarea>this is the declaration of the input textarea.

output from textarea type:

image.png

PASSWORD INPUT TYPE:

  • for the input type password difference is when we enter the character into the input box then the character will turn into a black dot.
    Password : <input name="password" type="password" /> this is the declaration of that type.
    output of input type password:
    image.png

DATE INPUT TYPE:

  • date input type is usually used for the process of inputting date, and date of birth.
  • the following is a declaration of date input type:
    <form action="" method="post"> Tanggal : <input name="tanggal" type="date" /></form>

output from date input type:

image.png

CHECKBOX INPUT TYPE

  • then we will create a checkbox, checkbox is often used for hobby input process, and others.
  • below is a script to create an input type checkbox
<form action="" method="post">
        Hobby : <input name="hobby" type="checkbox" value="football" /> football
                  <input name="hobby" type="checkbox" value="Baseball" /> Baseball
</form>

output dari checkbox input type:

image.png

OPTION INPUT TYPE:

  • input type option is an input process in which there are several options available to choose from.
  • this is the script for the input type option
<html>
  <body>
     <tr>
      <td valign="top">Country</td>
      <td valign="top">:</td>
      <td valign="top"><select name="country" id="country">
        <option value="england">england</option>
        <option value="america">america</option>
        <option value="japan">japan</option>
         <option value="taipe">taipe</option>
        <option value="ukraine">ukraine</option>
        <option value="ducth">ducth</option>
      </select></td>
</tr>
  </body>
</html>

output dari option inpu type:

image.png

okay tutorial is over, I've made some kind of input in making a form using PHP-HTML programming, let's try at home if there are less obvious you can ask directly on the comments

Curriculum

Place here a list of related tutorials you have already shared on Utopian that make up a Course Curriculum, if applicable.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utoh piah-moderator]

Hey @jerryloyal, Utopian Supervisor here - this user is NOT a part of our team. In fact, he's been banned for plagiarism. Please ignore his comment.

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • Tutorials must be technical instructions that teach non-trivial aspects of an Open Source project.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.05
TRX 0.29
JST 0.043
BTC 68137.14
ETH 1970.12
USDT 1.00
SBD 0.38