0% found this document useful (0 votes)
4 views

Employee Example

The document outlines an HTML form for collecting employee information, including fields for name, address, mobile number, date of birth, post, and salary. Upon submission, the data is sent to a PHP script (ex.php) that retrieves and displays the entered information. The form uses various input elements to capture user data and display it in a structured format.

Uploaded by

saeedarwatkar
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)
4 views

Employee Example

The document outlines an HTML form for collecting employee information, including fields for name, address, mobile number, date of birth, post, and salary. Upon submission, the data is sent to a PHP script (ex.php) that retrieves and displays the entered information. The form uses various input elements to capture user data and display it in a structured format.

Uploaded by

saeedarwatkar
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/ 2

Create Employee form like Employee_name, Address, Mobile_no,Date of birth, Post and Salary

using different form input element and display user inserted values in new PHP form.

<html>

<head><title>Example</title></head>

<body>

<form method=”get” action=”ex.php”>

<label>Employee name</label>

<input type=”text” name=”t1”><br><br>

<label>Address</label>

<textarea name="ta" rows="4" cols="50"></textarea><br><br>

<label>Mobile no</label>

<input type=”text” name=”t2”><br><br>

<label>Date of Birth</label>

<input type=”text” name=”t3”><br><br>

<label>POST</label>

<input type=”text” name=”t4”><br><br>

<label>Salary</label>

<input type=”text” name=”t5”><br><br>

<input type=”submit” value=”Submit”>

</form>

</body>

</html>

PHP program ex.php

<?php

$emp_name=$_GET[‘t1’];

$address=$_GET[‘ta’];

$mobno=$_GET[‘t2’];

$dob=$_GET[‘t3’];

$post=$_GET[‘t4’];
$sal=$_GET[‘t5’];

//Display the Data

echo “Employee Name : $emp_name <br>”;

echo “Address : $address <br>”;

echo “Mobile Number : $mobno <br>”;

echo “Date of birth : $dob <br>”;

echo “POST : $post <br>”;

echo “Salary : $sal <br>”;

?>

You might also like