Проверьте, представлена ​​ли форма PHP

<html>
<head>
<title>Test</title>
</head>
<body>

<form method="post">

Enter value1 :<input type="text" name="firstname"><br/>
Enter value2 :<input type="text" name="lastname"><br/>
<input type="submit" value="Submit" name="submit"><br/><br/>

<?php
if(isset($_POST["submit"]))
{
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
echo "Success";

}
?>

</form>
</body>
</html>
Chandan