0

This is my html file

<html>
<head>
<style>
label{display:inline-block;width:100px;margin-bottom:10px;}
</style>


<title>Add Employee</title>
</head>
<body>

<form method="post" action="">
<label>First Name</label>
<input type="text" name="first_name"/>
<br />
<label>Last Name</label>
<input type="text" name="last_name" />
<br />
<label>Department</label>
<input type="text" name="department" />
<br />
<label>Email</label>
<input type="text" name="email" />

<br />
<input type="submit" value="Add Employee">
</form>



</body>
</html>

This is my php file

<?php

echo $_POST['first_name'];
echo '<br />';
echo $_POST['email'];

?>

THe problem is everytime after i enter the name and the email. This 2 error will show:

Notice: Undefined index: first_name in C:\xampp\htdocs\Lab6\process.php on line 4
Notice: Undefined index: email in C:\xampp\htdocs\Lab6\process.php on line 6

Can anyone help me identify what is the problem actually?? Thanks. Btw i using xampp

Ron
  • 37
  • 5

0 Answers0