I am having problems getting user input from form. could you please tell where am I going wrong??
here's the add-employee.html code
<!DOCTYPE HTML>
<html>
<head>
<title>Add Employee</title>
<!--<script type="text/javascript" src="main.js"></script> -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<table>
<form action="/form" method="post">
<tr>
<th>
<label>Name:</label>
<input type="text" name="name">
</th>
<th>
<label>Designation:</label>
<input type="text" name="designation">
</th>
<th>
<label>PAN No:</label>
<input type="text" name="pan">
</th>
<th>
<label>Aadhar No:</label>
<input type="text" name="aadhar">
</th>
<th>
<label>Bank A/c:</label>
<input type="text" name="bank">
</th>
<th>
<label>Basic Salary:</label>
<input type="text" name="basicsalary">
</th>
<th>
<label>Other Allowance:</label>
<input type="text" name="allowance">
</th>
<th>
<label>ESI No:</label>
<input type="text" name="esi">
</th>
<th>
<label>UAN No:</label>
<input type="text" name="uan">
</th>
</tr>
<tr>
<td>
<input type="submit" name="submit_button">
</td>
</tr>
</form>
</table>
</body>
</html>
And here's the link to the server.js code which I am using to run the app. https://github.com/silentarrowz/payroll/blob/master/server.js when I submit the form I am expecting to get a response of 'employee' + name + 'added'
But I am getting the result as " employee undefined added ".
now, why is this happening? where am I going wrong?