0% found this document useful (0 votes)
21 views4 pages

PHP Sop1 Tags-1

The document outlines the usage of various HTML tags and PHP functions, focusing on the <form> and <input> tags, their attributes, and methods for submitting data. It also describes the PHP functions isset() and echo(), detailing their definitions and usage. Additionally, it provides an overview of PHP syntax and how PHP scripts are executed on the server.

Uploaded by

dhruvtamboli27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

PHP Sop1 Tags-1

The document outlines the usage of various HTML tags and PHP functions, focusing on the <form> and <input> tags, their attributes, and methods for submitting data. It also describes the PHP functions isset() and echo(), detailing their definitions and usage. Additionally, it provides an overview of PHP syntax and how PHP scripts are executed on the server.

Uploaded by

dhruvtamboli27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DIFFERENT TAGS AND PHP FUNCTIONS USED IN THE PROGRAM

1. <form> Tag
Definition and Usage
The <form> tag is used to create an HTML form for user input. The form in html is
created by using element as <form></form>

2. Form controls: A form is a collection of different elements also called as controls like
textbox, radio button, checkbox, submit button and many more.

Attributes used with form element :


<Form> tag can have following attributes

 Name: It specifies a name to a form.


 Action: The action attribute specifies the path where the form is to be submitted.
When user clicks on submit button if the action attribute is committed, the action is
set to the current page.
 Method: The method attribute specifies get or post method to be used when
submitting the form data. Method of form are GET or POST.
i) GET Method: The default method of submitting form data is GET. The data
submitted by using GET is visible in the address bar. It is better for data which is not
sensitive. The number of characters in GET method depends on browser.
ii) POST Method: The POST method of sending data does not display the form data in
the address bar. So it is a secure method to submit sensitive or personal information.
It does not have size limitations as in GET method.

2. <Input> Tag

Definition and Usage


The <input> tag specifies an input field where the user can enter data.
The <input> element is the most important form element.
The <input> element can be displayed in several ways, depending on the type attribute.

Attributes

Attribute Value Description

form form_id Specifies the form the <input> element belongs to


formaction URL Specifies the URL of the file that will process the input control
when the form is submitted (for type="submit" and type="image")

formmetho get Defines the HTTP method for sending data to the action URL (for
d post type="submit" and type="image")

maxlength number Specifies the maximum number of characters allowed in an <input>


element

min number Specifies a minimum value for an <input> element


date

name text Specifies the name of an <input> element

size number Specifies the width, in characters, of an <input> element

type button Specifies the type <input> element to display


checkbo
x
color
date
datetime-
local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week

value text Specifies the value of an <input> element

3. PHP isset() Function

Definition and Usage

The isset() function checks whether a variable is set, which means that it has to be declared and
is not NULL.

This function returns true if the variable exists and is not NULL, otherwise it returns false.

Note: If multiple variables are supplied, then this function will return true only if all of the
variables are set.

4. PHP Echo Function

Definition and Usage

The echo() function outputs one or more strings.

Note: The echo() function is not actually a function, so you are not required to use parentheses
with it. However, if you want to pass more than one parameter to echo(), using parentheses will
generate a parse error.

Syntax
echo(strings)
5. PHP Syntax
A PHP script is executed on the server, and the plain HTML result is sent back to the
browser.
Basic PHP Syntax

A PHP script can be placed anywhere in the document.

A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here
?>

The default file extension for PHP files is ".php".

A PHP file normally contains HTML tags, and some PHP scripting code.

You might also like