In the submit button code of HTML,
Use type="submit" instead of using type="button".
Here is the complete correct code of your HTML page:
<html>
<body>
<form name="" action="formvalidation.php" method="post">
<table border="0" align="center" cellpadding="2" cellspacing="5"><tr><td>
Name: </td><td> <input type="text" name="name" /> </td></tr><tr><td>
Age: </td><td> <input type="text" name="age" /> </td></tr><tr><td>
Occupation: </td><td> <input type="text" name="occupation" /></td></tr><tr><td></td>
<td><input type="submit" name="submit" value="Submit" /></td></tr>
</table>
</form>
</body>
</html>
Jan 20, 2011